Imrprove rename error (#2731)

Motivation:

The name of the syscall used in errors for all rename calls is "rename".
However, this isn't always correct, in some cases "renamex_np" is used,
and in others "renameat2" is used.

Modifications:

- Allow the name of the syscall to be provided to the rename error
- Use the correct syscall name

Result:

Better errors
This commit is contained in:
George Barnett authored and GitHub committed 2024-05-29 14:17:52 +01:00
1 parent 4612941246
commit 9f63b12a05
4 files changed
+9 -3

No files matched your search

+1
View File
@@ -1216,6 +1216,7 @@ extension FileSystem {
case let .failure(errno):
let error = FileSystemError.rename(
"rename",
errno: errno,
oldName: sourcePath,
newName: destinationPath,