Skip to content

Commit 0dbb94d

Browse files
committed
chore: verified parity of file open and save dialog in electron and tauri
1 parent 243b748 commit 0dbb94d

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

dist/virtualfs-debug.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20079,17 +20079,13 @@ const $e3f139c5065f0041$var$fileSystemLib = {
2007920079
return $e3f139c5065f0041$require$NativeFS.mountNativeFolder(...args);
2008020080
},
2008120081
openTauriFilePickerAsync: function(options) {
20082+
if (globalObject.__ELECTRON__) return $e3f139c5065f0041$require$ElectronFS.openElectronFilePickerAsync(options);
2008220083
return $e3f139c5065f0041$require$TauriFS.openTauriFilePickerAsync(options);
2008320084
},
2008420085
openTauriFileSaveDialogueAsync: function(options) {
20086+
if (globalObject.__ELECTRON__) return $e3f139c5065f0041$require$ElectronFS.openElectronFileSaveDialogueAsync(options);
2008520087
return $e3f139c5065f0041$require$TauriFS.openTauriFileSaveDialogueAsync(options);
2008620088
},
20087-
openElectronFilePickerAsync: function(options) {
20088-
return $e3f139c5065f0041$require$ElectronFS.openElectronFilePickerAsync(options);
20089-
},
20090-
openElectronFileSaveDialogueAsync: function(options) {
20091-
return $e3f139c5065f0041$require$ElectronFS.openElectronFileSaveDialogueAsync(options);
20092-
},
2009320089
getTauriPlatformPath: function(virtualPath) {
2009420090
if ($e3f139c5065f0041$require$TauriFS.isTauriPath(virtualPath) || $e3f139c5065f0041$require$TauriFS.isTauriSubPath(virtualPath)) return $e3f139c5065f0041$require$TauriFS.getTauriPlatformPath(virtualPath);
2009520091
return null;

dist/virtualfs-debug.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtualfs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtualfs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fslib.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ const fileSystemLib = {
106106
return NativeFS.mountNativeFolder(...args);
107107
},
108108
openTauriFilePickerAsync: function (options) {
109+
if(globalObject.__ELECTRON__) {
110+
return ElectronFS.openElectronFilePickerAsync(options);
111+
}
109112
return TauriFS.openTauriFilePickerAsync(options);
110113
},
111114
openTauriFileSaveDialogueAsync: function (options) {
115+
if(globalObject.__ELECTRON__) {
116+
return ElectronFS.openElectronFileSaveDialogueAsync(options);
117+
}
112118
return TauriFS.openTauriFileSaveDialogueAsync(options);
113119
},
114-
openElectronFilePickerAsync: function (options) {
115-
return ElectronFS.openElectronFilePickerAsync(options);
116-
},
117-
openElectronFileSaveDialogueAsync: function (options) {
118-
return ElectronFS.openElectronFileSaveDialogueAsync(options);
119-
},
120120
getTauriPlatformPath: function (virtualPath) {
121121
if(TauriFS.isTauriPath(virtualPath) || TauriFS.isTauriSubPath(virtualPath)) {
122122
return TauriFS.getTauriPlatformPath(virtualPath);

0 commit comments

Comments
 (0)