mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-31 19:27:00 -06:00
SEARCH-605
- Permission error on windows 7 temporary fix
This commit is contained in:
parent
9ca227ccb9
commit
ba342d571e
@ -25,13 +25,21 @@ function checkDiskSpace(path, resolve, reject) {
|
||||
return resolve(space >= searchConfig.MINIMUM_DISK_SPACE);
|
||||
});
|
||||
} else {
|
||||
exec(`fsutil volume diskfree ${path}`, (error, stdout, stderr) => {
|
||||
exec(`fsutil volume diskfree ${path}`, (error, stdout) => {
|
||||
if (error) {
|
||||
if (stderr.indexOf("No such file or directory") !== -1) {
|
||||
if (stdout.indexOf("Error: The system cannot find the path specified.") !== -1) {
|
||||
return reject(new Error("No such file or directory : " + error));
|
||||
}
|
||||
if (stdout.indexOf("The FSUTIL utility requires that you have administrative privileges.") !== -1) {
|
||||
// this is temporary until we use the custom exe file.
|
||||
return true;
|
||||
}
|
||||
return reject(new Error("Error : " + error));
|
||||
}
|
||||
if (stdout.indexOf("The FSUTIL utility requires that you have administrative privileges.") !== -1) {
|
||||
// this is temporary until we use the custom exe file.
|
||||
return true;
|
||||
}
|
||||
let data = stdout.trim().split("\n");
|
||||
|
||||
let disk_info_str = data[data.length - 1].split(':');
|
||||
|
Loading…
Reference in New Issue
Block a user