Browse Source

fix: rename with existing target path

Akeit0 6 months ago
parent
commit
4a08b48e98
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/Lua/IO/FileSystem.cs

+ 1 - 0
src/Lua/IO/FileSystem.cs

@@ -78,6 +78,7 @@
         public void Rename(string oldName, string newName)
         {
             if (oldName == newName) return;
+            if (File.Exists(newName)) File.Delete(newName);
             File.Move(oldName, newName);
             File.Delete(oldName);
         }