##// END OF EJS Templates
vfs: replace avoiding ambiguity in abstractvfs.rename with _avoidambig...
FUJIWARA Katsunori -
r33281:6af0f023 default
parent child Browse files
Show More
@@ -195,18 +195,8 b' class abstractvfs(object):'
195 195 dstpath = self.join(dst)
196 196 oldstat = checkambig and util.filestat.frompath(dstpath)
197 197 if oldstat and oldstat.stat:
198 def dorename(spath, dpath):
199 ret = util.rename(spath, dpath)
200 newstat = util.filestat.frompath(dpath)
201 if newstat.isambig(oldstat):
202 # stat of renamed file is ambiguous to original one
203 return ret, newstat.avoidambig(dpath, oldstat)
204 return ret, True
205 ret, avoided = dorename(srcpath, dstpath)
206 if not avoided:
207 # simply copy to change owner of srcpath (see issue5418)
208 util.copyfile(dstpath, srcpath)
209 ret, avoided = dorename(srcpath, dstpath)
198 ret = util.rename(srcpath, dstpath)
199 _avoidambig(dstpath, oldstat)
210 200 return ret
211 201 return util.rename(srcpath, dstpath)
212 202
General Comments 0
You need to be logged in to leave comments. Login now