mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-29 19:02:59 +02:00
Update Microsoft restriction and limitations (#725)
* Update Microsoft restriction and limitations about windows naming files to include '~' for folder names
This commit is contained in:
parent
c876b9c575
commit
0445ae03d3
|
@ -868,7 +868,8 @@ final class OneDriveApi
|
||||||
case 400:
|
case 400:
|
||||||
// Bad Request .. how should we act?
|
// Bad Request .. how should we act?
|
||||||
log.vlog("OneDrive returned a 'HTTP 400 - Bad Request' - gracefully handling error");
|
log.vlog("OneDrive returned a 'HTTP 400 - Bad Request' - gracefully handling error");
|
||||||
break;
|
// make sure this is thrown so that it is caught
|
||||||
|
throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response);
|
||||||
|
|
||||||
// 403 - Forbidden
|
// 403 - Forbidden
|
||||||
case 403:
|
case 403:
|
||||||
|
|
|
@ -2419,6 +2419,11 @@ final class SyncEngine
|
||||||
// but when we attempted to create it, OneDrive responded that it now already exists
|
// but when we attempted to create it, OneDrive responded that it now already exists
|
||||||
log.vlog("OneDrive reported that ", path, " already exists .. OneDrive API race condition");
|
log.vlog("OneDrive reported that ", path, " already exists .. OneDrive API race condition");
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
// some other error from OneDrive was returned - display what it is
|
||||||
|
log.error("OneDrive generated an error when creating this path: ", path);
|
||||||
|
displayOneDriveErrorMessage(e.msg);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Is the response a valid JSON object - validation checking done in saveItem
|
// Is the response a valid JSON object - validation checking done in saveItem
|
||||||
|
|
|
@ -190,6 +190,8 @@ bool isValidName(string path)
|
||||||
if (itemName == "desktop.ini") {matched = false;}
|
if (itemName == "desktop.ini") {matched = false;}
|
||||||
// _vti_ cannot appear anywhere in a file or folder name
|
// _vti_ cannot appear anywhere in a file or folder name
|
||||||
if(canFind(itemName, "_vti_")){matched = false;}
|
if(canFind(itemName, "_vti_")){matched = false;}
|
||||||
|
// Item name cannot equal '~'
|
||||||
|
if (itemName == "~") {matched = false;}
|
||||||
|
|
||||||
// return response
|
// return response
|
||||||
return matched;
|
return matched;
|
||||||
|
|
Loading…
Reference in a new issue