minor fix to only remove trailing slash if there is content at all in sig_bit of SymlinkName

This commit is contained in:
2021-03-21 12:06:56 +11:00
parent 1de74f8f51
commit 9c263f54e3

View File

@@ -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)