mirror of
https://github.com/9001/copyparty.git
synced 2026-03-11 02:33:33 +10:00
append file-ext when avoiding name collisions
This commit is contained in:
@@ -262,6 +262,11 @@ def ren_open(fname, *args, **kwargs):
|
||||
yield {"orz": [f, fname]}
|
||||
return
|
||||
|
||||
if suffix:
|
||||
ext = fname.split(".")[-1]
|
||||
if len(ext) < 7:
|
||||
suffix += "." + ext
|
||||
|
||||
orig_name = fname
|
||||
bname = fname
|
||||
ext = ""
|
||||
|
||||
Reference in New Issue
Block a user