improve logs for CfAPI handle requests in erroneous cases
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 5 Nov 2024 16:45:20 +0000 (17:45 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 22 Nov 2024 08:50:09 +0000 (09:50 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/vfs/cfapi/cfapiwrapper.cpp

index abe72f1916060cd9586f069378758be606395827..ed214b88f9d780b066a96a5193750a7aa2de0f4b 100644 (file)
@@ -781,10 +781,12 @@ bool OCC::CfApiWrapper::isSparseFile(const QString &path)
 OCC::CfApiWrapper::FileHandle OCC::CfApiWrapper::handleForPath(const QString &path)
 {
     if (path.isEmpty()) {
+        qCWarning(lcCfApiWrapper) << "empty path";
         return {};
     }
 
     if (!FileSystem::fileExists(path)) {
+        qCWarning(lcCfApiWrapper) << "file does not exist";
         return {};
     }
 
@@ -807,6 +809,7 @@ OCC::CfApiWrapper::FileHandle OCC::CfApiWrapper::handleForPath(const QString &pa
         }
     }
 
+    qCWarning(lcCfApiWrapper) << "no handle was created";
     return {};
 }