u2cli: always compare toplevel in syncs

This commit is contained in:
ed 2022-12-12 07:16:05 +01:00
parent e3406a9f86
commit af59808611

View file

@ -377,11 +377,12 @@ def walkdirs(err, tops):
for top in tops:
if top[-1:] == sep:
stop = top.rstrip(sep)
yield stop, b"", os.stat(stop)
else:
stop = os.path.dirname(top)
stop, dn = os.path.split(top)
yield stop, dn, os.stat(stop)
if os.path.isdir(top):
yield stop, b"", os.stat(stop)
for ap, inf in walkdir(err, top, []):
yield stop, ap[len(stop) :].lstrip(sep), inf
else: