From 9c263f54e3f6fcad1f353a0a9395098c6f7d8719 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 21 Mar 2021 12:06:56 +1100 Subject: [PATCH] minor fix to only remove trailing slash if there is content at all in sig_bit of SymlinkName --- shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared.py b/shared.py index 847547f..c1522d2 100644 --- a/shared.py +++ b/shared.py @@ -33,7 +33,7 @@ def SymlinkName(path, file): sig_bit=file.replace(path, "") last_dir=os.path.basename(path[0:-1]) - if sig_bit[-1] == '/': + if len(sig_bit) > 0 and sig_bit[-1] == '/': last_bit = os.path.dirname(sig_bit)[0:-1] else: last_bit = os.path.dirname(sig_bit)