From 9620458977ae03d517e809805f9ed10cbdbfca23 Mon Sep 17 00:00:00 2001 From: rrr-marble Date: Sun, 19 Dec 2021 18:20:07 +0300 Subject: [PATCH] fix: normalize global rel paths for win compat --- main.py | 4 ++-- util/import_photos.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 3708655..d6f9221 100644 --- a/main.py +++ b/main.py @@ -266,8 +266,8 @@ def unpack_pictures_zip(file: UploadFile, time): iph.run( db_location=DB_LOCATION, source=os.path.join(dir), - dest_shrunk=os.path.join(DATA_LOCATION, DEST_SHRUNK), - dest_original=os.path.join(DATA_LOCATION, DEST_ORIGINAL), + dest_shrunk=os.path.join(DATA_LOCATION, os.path.normcase(DEST_SHRUNK)), + dest_original=os.path.join(DATA_LOCATION, os.path.normcase(DEST_ORIGINAL)), ) rmtree(processing_path) diff --git a/util/import_photos.py b/util/import_photos.py index e65fbca..4e80210 100644 --- a/util/import_photos.py +++ b/util/import_photos.py @@ -190,7 +190,12 @@ def main(): sys.path.append(os.path.dirname(__file__) + "/..") import config as cfg - run(cfg.DB_LOCATION, argv[1], cfg.DEST_SHRUNK, cfg.DEST_ORIGINAL) + run( + cfg.DB_LOCATION, + argv[1], + path.normcase(cfg.DEST_SHRUNK), + path.normcase(cfg.DEST_ORIGINAL), + ) if __name__ == "__main__":