mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-29 19:02:59 +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
|
// Create the directory
|
||||||
string newPath = dirName(saveToPath);
|
string newPath = dirName(saveToPath);
|
||||||
|
try {
|
||||||
mkdirRecurse(newPath);
|
mkdirRecurse(newPath);
|
||||||
|
} catch (FileException e) {
|
||||||
|
// display the error message
|
||||||
|
displayFileSystemErrorMessage(e.msg);
|
||||||
|
}
|
||||||
|
|
||||||
// Configure the applicable permissions for the folder
|
// Configure the applicable permissions for the folder
|
||||||
newPath.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
newPath.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||||
const(char)[] url = driveByIdUrl ~ driveId ~ "/items/" ~ id ~ "/content?AVOverride=1";
|
const(char)[] url = driveByIdUrl ~ driveId ~ "/items/" ~ id ~ "/content?AVOverride=1";
|
||||||
|
|
|
@ -2423,10 +2423,15 @@ final class SyncEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
|
try {
|
||||||
// Create the new directory
|
// Create the new directory
|
||||||
mkdirRecurse(path);
|
mkdirRecurse(path);
|
||||||
// Configure the applicable permissions for the folder
|
// Configure the applicable permissions for the folder
|
||||||
path.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
path.setAttributes(cfg.returnRequiredDirectoryPermisions());
|
||||||
|
} catch (FileException e) {
|
||||||
|
// display the error message
|
||||||
|
displayFileSystemErrorMessage(e.msg);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// we dont create the directory, but we need to track that we 'faked it'
|
// we dont create the directory, but we need to track that we 'faked it'
|
||||||
idsFaked ~= [item.driveId, item.id];
|
idsFaked ~= [item.driveId, item.id];
|
||||||
|
|
Loading…
Reference in a new issue