mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-19 14:15:25 +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:
|
||||
// Bad Request .. how should we act?
|
||||
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
|
||||
case 403:
|
||||
|
|
|
@ -2419,6 +2419,11 @@ final class SyncEngine
|
|||
// 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");
|
||||
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
|
||||
|
|
|
@ -190,6 +190,8 @@ bool isValidName(string path)
|
|||
if (itemName == "desktop.ini") {matched = false;}
|
||||
// _vti_ cannot appear anywhere in a file or folder name
|
||||
if(canFind(itemName, "_vti_")){matched = false;}
|
||||
// Item name cannot equal '~'
|
||||
if (itemName == "~") {matched = false;}
|
||||
|
||||
// return response
|
||||
return matched;
|
||||
|
|
Loading…
Reference in a new issue