diff --git a/pym/update/update.py b/pym/update/update.py index 0bad4b0..ea7707c 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -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(