You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to rename file to a destination folder where the user has no access, rename fails with EPERM error correctly, but when the target file exists, it fails immediately, when the target file does not exists, it fails after 60 sec. E.g. my code:
IMHO fs.stat result should be checked that target is a directory, too.
Note: to fail fast if AV is blocking the rename, could be possible to open and close target, something like fs.open(src, 'a') ... fs.close(...) ? If so, it may not be part of the library, but could be documented in README.md only, I think.
The text was updated successfully, but these errors were encountered:
xmedeko
changed the title
Different speed of rename fo file to non-accessible destination on Windows
Different speed of file rename to non-accessible destination on Windows
Apr 4, 2024
Hello, I'm trying to rename file to a destination folder where the user has no access,
rename
fails withEPERM
error correctly, but when the target file exists, it fails immediately, when the target file does not exists, it fails after 60 sec. E.g. my code:Since I have no antivirus which would require to use this rename - retry workaround, I am not able to test if such difference is reasoned or a bug.
I think the problem is in the solution of #98 and commit 90a96bc, see also code
node-graceful-fs/polyfills.js
Line 107 in 2343799
fs.stat
result should be checked that target is a directory, too.Note: to fail fast if AV is blocking the rename, could be possible to open and close target, something like
fs.open(src, 'a')
...fs.close(...)
? If so, it may not be part of the library, but could be documented in README.md only, I think.The text was updated successfully, but these errors were encountered: