Skip to content

Commit

Permalink
fix: import configuration filepath issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marisademeglio committed Oct 11, 2023
1 parent 4f9ded2 commit 43799a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"displayName": "DAISY Pipeline (2023)",
"name": "pipeline-ui",
"description": "User interface for the DAISY Pipeline",
"version": "1.2.1-BETA",
"version": "1.2.2-BETA",
"main": "./node_modules/.dev-temp-build/main.js",
"devTempBuildFolder": "./node_modules/.dev-temp-build",
"devServer": "http://localhost:4927",
Expand Down
13 changes: 11 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,13 @@ function buildMenu() {
],
// @ts-ignore
properties: ['openFile'],
}
},
false
)
})
let configFile = await openFile
// @ts-ignore
configFile = configFile.replace('file://', '')
//configFile = configFile.replace('file://', '')
if (fs.existsSync(configFile)) {
fs.copyFileSync(
configFile,
Expand All @@ -195,6 +196,14 @@ function buildMenu() {
message:
'Please restart the DAISY Pipeline to reload the configuration.',
})
} else {
await dialog.showMessageBox({
type: 'warning',
title: 'Could not copy file',
message: `The file ${configFile} could not be copied to ${app.getPath(
'userData'
)}`,
})
}
},
})
Expand Down

0 comments on commit 43799a9

Please sign in to comment.