From bfada5e74045cb4d4fde0753044c63e371dc418f Mon Sep 17 00:00:00 2001 From: Cedric Leporcq Date: Sun, 8 Aug 2021 12:43:17 +0200 Subject: [PATCH] Fix load path definition --- dozo/config.py | 6 ++---- dozo/constants.py | 2 +- dozo/filesystem.py | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dozo/config.py b/dozo/config.py index 0e19983..5242d29 100644 --- a/dozo/config.py +++ b/dozo/config.py @@ -49,9 +49,7 @@ def get_path_definition(config): if 'format' in config['Path']: return config['Path']['format'] elif 'dirs_path' and 'name' in config['Path']: - return path.join(config['Path']['dirs_path'], - config['Path']['name']) - - return path.join(constants.default_path, constants.default_name) + return config['Path']['dirs_path'] + '/' + config['Path']['name'] + return constants.default_path + '/' + constants.default_name diff --git a/dozo/constants.py b/dozo/constants.py index cde23e7..4e7436c 100644 --- a/dozo/constants.py +++ b/dozo/constants.py @@ -17,7 +17,7 @@ if ( application_directory = environ['ELODIE_APPLICATION_DIRECTORY'] default_path = '{%Y-%m-%b}/{album}|{city}|{"Unknown Location"}' -default_name = '{%Y-%m-%d_%H-%M-%S}-{original_name}-{title}.{ext}' +default_name = '{%Y-%m-%d_%H-%M-%S}-{name}-{title}.%l{ext}' default_geocoder = 'Nominatim' # Checksum storage file. hash_db = 'hash.json' diff --git a/dozo/filesystem.py b/dozo/filesystem.py index c9b11c0..d4f5f17 100644 --- a/dozo/filesystem.py +++ b/dozo/filesystem.py @@ -270,8 +270,6 @@ class FileSystem(object): :returns: string""" - # if self.path_format is None: - # path_format = self.get_path_definition() path_format = self.path_format path = [] path_parts = path_format.split('/')