изменено: pym/update/update.py

master 3.7.2.51
root 1 year ago
parent 0bca2fc5cd
commit 5e2a3f16ca

@ -599,7 +599,7 @@ class Update(MethodsInterface):
else:
for root, dirs, files in os.walk(rpath):
for f in files:
os.replace(os.path.join(rpath, d), os.path.join(rpath_old, f))
os.replace(os.path.join(rpath, f), os.path.join(rpath_old, f))
for d in dirs:
shutil.move(os.path.join(rpath, d), os.path.join(rpath_old, d))
clearDirectory(rpath)
@ -607,7 +607,7 @@ class Update(MethodsInterface):
if p.failed():
for root, dirs, files in os.walk(rpath_old):
for f in files:
os.replace(os.path.join(rpath_old, d), os.path.join(rpath, f))
os.replace(os.path.join(rpath_old, f), os.path.join(rpath, f))
for d in dirs:
shutil.move(os.path.join(rpath_old, d), os.path.join(rpath, d))
raise UpdateError(

Loading…
Cancel
Save