@@ -17698,8 +17698,9 @@ async function $bd5c47de9e98f4fa$var$rename(oldPath, newPath, cb) {
1769817698 }, 0);
1769917699 });
1770017700}
17701- // this is when in windows, you have to rename "a.txt" to "A.TXT". We have to have an intermediate name
17702- async function $bd5c47de9e98f4fa$var$renameWindowsSameName(oldPath, newPath, cb) {
17701+ // this is when in windows/macos, the fs is not case-sensitive, you have to rename "a.txt" to "A.TXT".
17702+ // We have to have an intermediate name
17703+ async function $bd5c47de9e98f4fa$var$renameSameNameDiffCase(oldPath, newPath, cb) {
1770317704 const tempPath = globalObject.path.normalize(oldPath) + "_" + Math.floor(Math.random() * 4294967296);
1770417705 $bd5c47de9e98f4fa$var$rename(oldPath, tempPath, (err)=>{
1770517706 if (err) cb(err);
@@ -17725,7 +17726,7 @@ const $bd5c47de9e98f4fa$var$NativeFS = {
1772517726 unlink: $bd5c47de9e98f4fa$var$unlink,
1772617727 copy: $bd5c47de9e98f4fa$var$copy,
1772717728 rename: $bd5c47de9e98f4fa$var$rename,
17728- renameWindowsSameName : $bd5c47de9e98f4fa$var$renameWindowsSameName
17729+ renameSameNameDiffCase : $bd5c47de9e98f4fa$var$renameSameNameDiffCase
1772917730};
1773017731$bd5c47de9e98f4fa$exports = {
1773117732 NativeFS: $bd5c47de9e98f4fa$var$NativeFS
@@ -19627,7 +19628,6 @@ $b45ac22e865b129b$exports = (parcelRequire("1xCGA"));
1962719628
1962819629let $e3f139c5065f0041$var$filerLib = null;
1962919630let $e3f139c5065f0041$var$filerShell = null;
19630- const $e3f139c5065f0041$var$IS_WINDOWS = navigator.userAgent.includes("Windows");
1963119631/**
1963219632 * Offers functionality similar to mkdir -p
1963319633 *
@@ -19765,11 +19765,11 @@ const $e3f139c5065f0041$var$fileSystemLib = {
1976519765 cb(new $e3f139c5065f0041$require$Errors.EPERM("Tauri root directory cannot be renamed."));
1976619766 return;
1976719767 }
19768- if ($e3f139c5065f0041$var$IS_WINDOWS && oldPath.toLowerCase() === newPath.toLowerCase()) {
19768+ if (oldPath !== newPath && oldPath.toLowerCase() === newPath.toLowerCase()) {
1976919769 // in windows, we should be able to rename "a.txt" to "A.txt". Since windows is case-insensitive,
1977019770 // the below stat(A.txt) will return a stat for "a.txt" which is not what we want.
1977119771 if ($e3f139c5065f0041$require$TauriFS.isTauriSubPath(oldPath) && $e3f139c5065f0041$require$TauriFS.isTauriSubPath(newPath)) return $e3f139c5065f0041$require$TauriFS.rename(oldPath, newPath, callbackInterceptor);
19772- else if ($e3f139c5065f0041$require$Mounts.isMountSubPath(oldPath) && $e3f139c5065f0041$require$Mounts.isMountSubPath(newPath)) return $e3f139c5065f0041$require$NativeFS.renameWindowsSameName (oldPath, newPath, callbackInterceptor);
19772+ else if ($e3f139c5065f0041$require$Mounts.isMountSubPath(oldPath) && $e3f139c5065f0041$require$Mounts.isMountSubPath(newPath)) return $e3f139c5065f0041$require$NativeFS.renameSameNameDiffCase (oldPath, newPath, callbackInterceptor);
1977319773 }
1977419774 $e3f139c5065f0041$var$fileSystemLib.stat(newPath, (err)=>{
1977519775 if (!err) {
0 commit comments