* 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:
abraunegg 2024-09-18 14:39:02 +10:00 committed by GitHub
commit fd3a34e19a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;