From e1af427fad8a5d3c0d7fe156192be5bb86b4d56e Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Thu, 12 Jan 2023 17:12:48 +1100 Subject: [PATCH] fixed BUG-115 move to existing paths can contain dashes --- BUGs | 2 -- files.py | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/BUGs b/BUGs index 93f5937..04e6285 100644 --- a/BUGs +++ b/BUGs @@ -9,5 +9,3 @@ BUG-109: add mich force override, removed it, then re-added it, then rebuild DB BUG-114: when moving files, the offered similar dirs include those from other paths: - when we change the sel_rp (and icon), should also change offered similar dirs - AND its showing 'Import/Camera_Uploads/...' - is this a path issue in files.py / GetExisting* or? -BUG-115: GetExistingPaths chomps suffix when it contains '-' - - '2021/20211231-new-years-eve' -> prefix='2021/20211231-' & suffix='new' diff --git a/files.py b/files.py index 73569af..a065ff8 100644 --- a/files.py +++ b/files.py @@ -809,7 +809,8 @@ def GetExistingPathsAsDiv(dt): continue if not first_dir: ret +=", " - bits=dir.rel_path.split('-') + # maxsplit 1, means bits[1] can contain dashes + bits=dir.rel_path.split('-',maxsplit=1) ret+= '{ ' ret+= '"prefix":"' + bits[0] + '-", '