diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-12-17 16:03:01 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-12-17 17:30:54 +0300 |
commit | f3ac560211989daabed45c4a35f81b89973fe5c4 (patch) | |
tree | 7d86f64764d7ca118271fdad5b3117e7b95e9bef /src/libsync/syncengine.cpp | |
parent | f4420e707006a790836edae67939a0c73c4672ea (diff) |
Handle errors in convertToPlaceholder
Diffstat (limited to 'src/libsync/syncengine.cpp')
-rw-r--r-- | src/libsync/syncengine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 3ec0ab722..3b331ed1f 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -340,7 +340,12 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item) // Ensure it's a placeholder file on disk if (item->_type == ItemTypeFile) { - _syncOptions._vfs->convertToPlaceholder(filePath, *item); + const auto result = _syncOptions._vfs->convertToPlaceholder(filePath, *item); + if (!result) { + item->_instruction = CSYNC_INSTRUCTION_ERROR; + item->_errorString = tr("Could not update file : %1").arg(result.error()); + return; + } } // Update on-disk virtual file metadata |