From af598086110bbfe508c25299640319a1116137b8 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 12 Dec 2022 07:16:05 +0100 Subject: [PATCH] u2cli: always compare toplevel in syncs --- bin/up2k.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/up2k.py b/bin/up2k.py index 6e09ad13..e11d50b0 100755 --- a/bin/up2k.py +++ b/bin/up2k.py @@ -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: