mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
gracefully handle one case of invalid handles
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
a3013de6ea
commit
072e9d44bd
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ Result<Vfs::ConvertToPlaceholderResult, QString> VfsCfApi::convertToPlaceholder(
|
|||
const auto replacesPath = QDir::toNativeSeparators(replacesFile);
|
||||
|
||||
const auto handle = cfapi::handleForPath(localPath);
|
||||
if (!handle) {
|
||||
return { "Invalid handle for path " + localPath };
|
||||
}
|
||||
if (cfapi::findPlaceholderInfo(handle)) {
|
||||
return cfapi::updatePlaceholderInfo(handle, item._modtime, item._size, item._fileId, replacesPath);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue