mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
don't unwrap single folders in zip/tar downloads
This commit is contained in:
parent
3a9d3b7b61
commit
9a146192b7
|
@ -434,7 +434,11 @@ class VFS(object):
|
|||
f2a = os.sep + "dir.txt"
|
||||
f2b = "{0}.hist{0}".format(os.sep)
|
||||
|
||||
g = self.walk("", vrem, [], uname, [[True]], dots, scandir, False)
|
||||
# if multiselect: add all items to archive root
|
||||
# if single folder: the folder itself is the top-level item
|
||||
folder = "" if flt else (vrem.split("/")[-1] or "top")
|
||||
|
||||
g = self.walk(folder, vrem, [], uname, [[True]], dots, scandir, False)
|
||||
for _, _, vpath, apath, files, rd, vd in g:
|
||||
if flt:
|
||||
files = [x for x in files if x[0] in flt]
|
||||
|
|
Loading…
Reference in a new issue