mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 11:24:08 +00:00
Update osfiles.nim, make moveFile consider permission on *nix (#22719)
see https://github.com/nim-lang/Nim/issues/22674
This commit is contained in:
@@ -399,7 +399,7 @@ proc moveFile*(source, dest: string) {.rtl, extern: "nos$1",
|
||||
raiseAssert "unreachable"
|
||||
else:
|
||||
# Fallback to copy & del
|
||||
copyFile(source, dest, {cfSymlinkAsIs})
|
||||
copyFileWithPermissions(source, dest, options={cfSymlinkAsIs})
|
||||
try:
|
||||
removeFile(source)
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user