remove speedbumps

This commit is contained in:
ed
2021-03-04 01:21:04 +01:00
parent 914e22c53e
commit da01413b7b
5 changed files with 43 additions and 31 deletions

View File

@@ -1119,7 +1119,7 @@ class HttpCli(object):
try:
vn, rem = self.auth.vfs.get(top, self.uname, True, False)
fsroot, vfs_ls, vfs_virt = vn.ls(rem, self.uname)
fsroot, vfs_ls, vfs_virt = vn.ls(rem, self.uname, not self.args.no_sendfile)
except:
vfs_ls = []
vfs_virt = {}
@@ -1130,13 +1130,13 @@ class HttpCli(object):
dirs = []
vfs_ls = [x[0] for x in vfs_virt if stat.S_ISDIR(x[1])]
if not self.args.ed or "dots" not in self.uparam:
vfs_ls = exclude_dotfiles(vfs_ls)
for fn in [x for x in vfs_ls if x != excl]:
abspath = os.path.join(fsroot, fn)
if os.path.isdir(abspath):
dirs.append(fn)
dirs.append(os.path.join(fsroot, fn))
for x in vfs_virt.keys():
if x != excl:
@@ -1175,7 +1175,9 @@ class HttpCli(object):
return self.tx_file(abspath)
fsroot, vfs_ls, vfs_virt = vn.ls(rem, self.uname)
fsroot, vfs_ls, vfs_virt = vn.ls(rem, self.uname, not self.args.no_sendfile)
stats = {k: v for k, v in vfs_ls}
vfs_ls = [x[0] for x in vfs_ls]
vfs_ls.extend(vfs_virt.keys())
# check for old versions of files,
@@ -1226,7 +1228,7 @@ class HttpCli(object):
fspath = fsroot + "/" + fn
try:
inf = os.stat(fsenc(fspath))
inf = stats[fn]
except:
self.log("broken symlink: {}".format(repr(fspath)))
continue