mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-19 14:15:25 +02:00
catch folder creation errors due to file system permissions error
* catch folder creation errors due to file system permissions error
This commit is contained in:
parent
cc2b8085f5
commit
ac02b768d3
|
@ -506,7 +506,13 @@ final class OneDriveApi
|
|||
|
||||
// Create the directory
|
||||
string newPath = dirName(saveToPath);
|
||||
mkdirRecurse(newPath);
|
||||
try {
|
||||
mkdirRecurse(newPath);
|
||||
} catch (FileException e) {
|
||||
// display the error message
|
||||
displayFileSystemErrorMessage(e.msg);
|
||||
}
|
||||
|
||||
// Configure the applicable permissions for the folder
|
||||
newPath.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||
const(char)[] url = driveByIdUrl ~ driveId ~ "/items/" ~ id ~ "/content?AVOverride=1";
|
||||
|
|
13
src/sync.d
13
src/sync.d
|
@ -2423,10 +2423,15 @@ final class SyncEngine
|
|||
}
|
||||
|
||||
if (!dryRun) {
|
||||
// Create the new directory
|
||||
mkdirRecurse(path);
|
||||
// Configure the applicable permissions for the folder
|
||||
path.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||
try {
|
||||
// Create the new directory
|
||||
mkdirRecurse(path);
|
||||
// Configure the applicable permissions for the folder
|
||||
path.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||
} catch (FileException e) {
|
||||
// display the error message
|
||||
displayFileSystemErrorMessage(e.msg);
|
||||
}
|
||||
} else {
|
||||
// we dont create the directory, but we need to track that we 'faked it'
|
||||
idsFaked ~= [item.driveId, item.id];
|
||||
|
|
Loading…
Reference in a new issue