diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 44712b3e..38482119 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -425,7 +425,10 @@ class Up2k(object): ret += self._build_dir(dbw, top, excl, abspath, nohash) else: # self.log("file: {}".format(abspath)) - rp = abspath[len(top) :].replace("\\", "/").strip("/") + rp = abspath[len(top) + 1 :] + if WINDOWS: + rp = rp.replace("\\", "/").strip("/") + rd, fn = rp.rsplit("/", 1) if "/" in rp else ["", rp] sql = "select w, mt, sz from up where rd = ? and fn = ?" try: