Fix application crash when unable to rename folder structure due to unhandled file-system issue (#1366)

* Fix application crash when unable to rename folder structure due to unhandled file-system issue
This commit is contained in:
abraunegg 2021-03-27 07:28:40 +11:00 committed by GitHub
parent 71601d3240
commit fd04d632d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2523,7 +2523,14 @@ final class SyncEngine
safeRename(newPath);
}
}
rename(oldPath, newPath);
// try and rename path, catch exception
try {
log.vdebug("Calling rename(oldPath, newPath)");
rename(oldPath, newPath);
} catch (FileException e) {
// display the error message
displayFileSystemErrorMessage(e.msg, getFunctionName!({}));
}
}
// handle changed content and mtime
// HACK: use mtime+hash instead of cTag because of https://github.com/OneDrive/onedrive-api-docs/issues/765