mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Fix openFileBrowser not working with paths with spaces
This commit is contained in:
parent
e70906a9c6
commit
98e1c42183
1 changed files with 5 additions and 1 deletions
|
@ -94,6 +94,7 @@ var acPath = null;
|
|||
|
||||
var debug = argv.debug;
|
||||
|
||||
|
||||
if (argv.localDebugBuilds || argv.localReleaseBuilds) {
|
||||
interfacePath = pathFinder.discoveredPath("Interface", argv.localReleaseBuilds);
|
||||
dsPath = pathFinder.discoveredPath("domain-server", argv.localReleaseBuilds);
|
||||
|
@ -104,8 +105,11 @@ if (argv.localDebugBuilds || argv.localReleaseBuilds) {
|
|||
// TODO: show an error for the binaries that couldn't be found
|
||||
|
||||
function openFileBrowser(path) {
|
||||
// Add quotes around path
|
||||
path = '"' + path + '"';
|
||||
if (osType == "Windows_NT") {
|
||||
childProcess.exec('start ' + path);
|
||||
console.log('start "" ' + path);
|
||||
childProcess.exec('start "" ' + path);
|
||||
} else if (osType == "Darwin") {
|
||||
childProcess.exec('open ' + path);
|
||||
} else if (osType == "Linux") {
|
||||
|
|
Loading…
Reference in a new issue