File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
2020 // CLI and paths
2121 getCliArgs : ( ) => ipcRenderer . invoke ( 'get-cli-args' ) ,
2222 getAppPath : ( ) => ipcRenderer . invoke ( 'get-app-path' ) ,
23- getDocumentsDir : ( ) => ipcRenderer . invoke ( 'get-documents-dir' ) ,
23+ documentDir : ( ) => ipcRenderer . invoke ( 'get-documents-dir' ) ,
2424 appLocalDataDir : ( ) => ipcRenderer . invoke ( 'get-app-data-dir' ) ,
2525 getWindowsDrives : ( ) => ipcRenderer . invoke ( 'get-windows-drives' ) ,
2626 showOpenDialog : ( options ) => ipcRenderer . invoke ( 'show-open-dialog' , options ) ,
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ async function openElectronFilePickerAsync(options) {
9999 options = options || { multiple : false } ;
100100
101101 if ( ! options . defaultPath ) {
102- options . defaultPath = await globalObject . electronAPI . getDocumentsDir ( ) ;
102+ options . defaultPath = await globalObject . electronAPI . documentDir ( ) ;
103103 }
104104
105105 const dialogOptions = {
@@ -150,7 +150,7 @@ async function openElectronFileSaveDialogueAsync(options) {
150150 options = options || { } ;
151151
152152 if ( ! options . defaultPath ) {
153- options . defaultPath = await globalObject . electronAPI . getDocumentsDir ( ) ;
153+ options . defaultPath = await globalObject . electronAPI . documentDir ( ) ;
154154 }
155155
156156 const dialogOptions = {
Original file line number Diff line number Diff line change 8585 }
8686 // Electron detection and setup
8787 if ( window . electronAPI ) {
88- window . electronAPI . getDocumentsDir ( ) . then ( d => console . log ( "Electron documentsDir:" , d ) ) ;
88+ window . electronAPI . documentDir ( ) . then ( d => console . log ( "Electron documentsDir:" , d ) ) ;
8989 window . electronAPI . appLocalDataDir ( ) . then ( d => console . log ( "Electron appDataDir:" , d ) ) ;
9090 window . electronAPI . getAppPath ( ) . then ( appPath => {
9191 const nodeSrcPath = appPath + "/../src-tauri/node-src/index.js" ;
You can’t perform that action at this time.
0 commit comments