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
Windows apps installed via .appx may be installed to any drive the user chooses. From what I understand, when an appx application is executed, the file system is virtualized; Windows lies to the application about where it is running from, and when the application accesses a file, Windows proxies the calls across from the virtualized location to the actual location.
Example: if Windows is installed on C:, I can install an AppX application on D:. When the application is launched, Windows will the application CWD will be C:\Users\David\AppData\Roaming\{AppName} instead of somewhere on the D: drive.
(note: I could be wrong about what Windows is really doing here!)
All that to say... the following call to fs.renameSync may fail with a cross-device link not permitted error. I wish Windows would handle this internally, as this really seems more like a Windows bug than bug in write-file-atomic to me.
Windows apps installed via
.appx
may be installed to any drive the user chooses. From what I understand, when an appx application is executed, the file system is virtualized; Windows lies to the application about where it is running from, and when the application accesses a file, Windows proxies the calls across from the virtualized location to the actual location.Example: if Windows is installed on
C:
, I can install an AppX application onD:
. When the application is launched, Windows will the application CWD will beC:\Users\David\AppData\Roaming\{AppName}
instead of somewhere on theD:
drive.(note: I could be wrong about what Windows is really doing here!)
All that to say... the following call to
fs.renameSync
may fail with across-device link not permitted
error. I wish Windows would handle this internally, as this really seems more like a Windows bug than bug in write-file-atomic to me.write-file-atomic/index.js
Line 244 in eb8dff1
A potential solution may be to first try the rename, then try a
copy
+delete
operation if that rename fails.related issue: trufflesuite/ganache-ui#1943
The text was updated successfully, but these errors were encountered: