mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-04 23:12:18 +02:00
Catch error when creating sync dir fails (#608)
* Catch error when creating the sync dir fails - we cant run if this is not created or present
This commit is contained in:
parent
8f71043f23
commit
100e644ae0
|
@ -268,7 +268,15 @@ int main(string[] args)
|
|||
log.vlog("All operations will be performed in: ", syncDir);
|
||||
if (!exists(syncDir)) {
|
||||
log.vdebug("syncDir: Configured syncDir is missing. Creating: ", syncDir);
|
||||
try {
|
||||
// Attempt to create the sync dir we have been configured with
|
||||
mkdirRecurse(syncDir);
|
||||
} catch (std.file.FileException e) {
|
||||
// Creating the sync directory failed
|
||||
log.error("ERROR: Unable to create local OneDrive syncDir - ", e.msg);
|
||||
oneDrive.http.shutdown();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
chdir(syncDir);
|
||||
|
||||
|
|
Loading…
Reference in a new issue