From 9eb82bf1c325769f6f9060e34cef7b4381461e0e Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Tue, 22 Jun 2021 18:42:03 +1000 Subject: [PATCH] added comment & TODO to recode SymlinkName one day --- TODO | 1 + shared.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/TODO b/TODO index 253b428..5840482 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,7 @@ * Dir can have date in the DB, so we can do Oldest/Newest dirs in Folder view ### BACKEND + * revisit SymlinkName() and make it simpler (see comment in shared.py) -- started on some basic optimisations (commit logs every 100 logs, not each log) - with debugs: import = 04:11, getfiledetails== 0:35:35 - without debugs: import == 04:03, getfiledetails == 0:35:36 -- not a sig diff diff --git a/shared.py b/shared.py index 3c0e570..ae68bb2 100644 --- a/shared.py +++ b/shared.py @@ -53,6 +53,14 @@ def LocationIcon(obj): +# translate a path type, a full FS path and a file into the full FS path of the +# symlink on the file system. To note, this is used with file == path, when we +# want to just get the symlink to the path itself, otherwise file == +### FIXME: I think this is way over-complicated, want to revist one day, with +#what params are passed in, what we need to get out -- I think the overloaded +#file/oath use case, and why sometimes we trail with a / or not and then concat +#last_dir and bit before last_dir, etc. this feels a bit too complicated for +#what it does OR we comment this much better def SymlinkName(ptype, path, file): sig_bit=file.replace(path, "") last_dir=os.path.basename(path[0:-1])