This commit is contained in:
ed 2021-08-06 11:10:04 +02:00
parent e47a2a4ca2
commit ae3a01038b
2 changed files with 11 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# coding: utf-8
VERSION = (0, 12, 11)
VERSION = (0, 12, 12)
CODENAME = "fil\033[33med"
BUILD_DT = (2021, 8, 6)

View file

@ -1424,6 +1424,7 @@ class Up2k(object):
st = bos.lstat(sabs)
if stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode):
with self.mutex:
return self._mv_file(uname, svp, dvp)
jail = svn.get_dbv(srem)[0]
@ -1449,6 +1450,7 @@ class Up2k(object):
raise Pebkac(500, "mv: bug at {}, top {}".format(svpf, svp))
dvpf = dvp + svpf[len(svp) :]
with self.mutex:
self._mv_file(uname, svpf, dvpf)
rmdirs(self.log_func, scandir, True, sabs)
@ -1541,12 +1543,14 @@ class Up2k(object):
self.log("forgetting {}".format(vrem))
if wark:
self.log("found {} in db".format(wark))
if drop_tags:
if self._relink(wark, ptop, vrem, None):
drop_tags = False
if drop_tags:
q = "delete from mt where w=?"
cur.execute(q, (wark[:16],))
self.db_rm(cur, srd, sfn)
reg = self.registry.get(ptop)
@ -1599,7 +1603,7 @@ class Up2k(object):
# deleting final remaining full copy; swap it with a symlink
slabs = list(sorted(links.keys()))[0]
ptop, rem = links.pop(slabs)
self.log("linkswap [{}] and [{}]".format(sabs, dabs))
self.log("linkswap [{}] and [{}]".format(sabs, slabs))
bos.unlink(slabs)
bos.rename(sabs, slabs)
self._symlink(slabs, sabs, False)