mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
* If 'sync_list' is being used, and the file online contains URL encoded items, and cannot be URL decoded, catch the exception generated and generate an error message regarding the issue to advise the user to rename the offending item online.
This commit is contained in:
parent
f3b4a3326d
commit
fd3a34e19a
1 changed files with 11 additions and 1 deletions
12
src/sync.d
12
src/sync.d
|
|
@ -3835,7 +3835,17 @@ class SyncEngine {
|
|||
if (containsURLEncodedItems(selfBuiltPath)) {
|
||||
// decode it
|
||||
addLogEntry("selfBuiltPath for sync_list check needs decoding: " ~ selfBuiltPath, ["debug"]);
|
||||
newItemPath = decodeComponent(selfBuiltPath);
|
||||
|
||||
try {
|
||||
// try and decode selfBuiltPath
|
||||
newItemPath = decodeComponent(selfBuiltPath);
|
||||
} catch (URIException exception) {
|
||||
// why?
|
||||
addLogEntry("ERROR: Unable to URL Decode path: " ~ exception.msg);
|
||||
addLogEntry("ERROR: To resolve, rename this item online: " ~ selfBuiltPath);
|
||||
// have to use as-is due to decode error
|
||||
newItemPath = selfBuiltPath;
|
||||
}
|
||||
} else {
|
||||
// use as-is
|
||||
newItemPath = selfBuiltPath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue