Browse Source

Merge pull request #1104 from DvdGiessen/os-rename-between-filesystems

use shutil.move instead of os.rename to move file
Christopher Haster 7 months ago
parent
commit
523319b685
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/changeprefix.py

+ 1 - 1
scripts/changeprefix.py

@@ -73,7 +73,7 @@ def changefile(from_prefix, to_prefix, from_path, to_path, *,
         shutil.copystat(from_path, to_path)
 
     if to_path_temp:
-        os.rename(to_path, from_path)
+        shutil.move(to_path, from_path)
     elif from_path != '-':
         os.remove(from_path)