Revert "Fix CfAPI wrapper build in Win32 mode"
authorKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 7 Jan 2021 12:40:01 +0000 (13:40 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 7 Jan 2021 12:40:01 +0000 (13:40 +0100)
This reverts commit 3b3864296a2bc09540989241325e938ed5a3275e.

src/libsync/vfs/cfapi/cfapiwrapper.cpp

index 5fba7b72407e42c52a61075b77aee02df21b7544..62ffcffa1c4268be0b461383dbdc7d608524b554 100644 (file)
@@ -346,13 +346,13 @@ OCC::CfApiWrapper::FileHandle OCC::CfApiWrapper::handleForPath(const QString &pa
         HANDLE handle = nullptr;
         const qint64 openResult = CfOpenFileWithOplock(path.toStdWString().data(), CF_OPEN_FILE_FLAG_NONE, &handle);
         if (openResult == S_OK) {
-            return FileHandle(handle, CfCloseHandle);
+            return {handle, CfCloseHandle};
         }
     } else {
         const auto handle = CreateFile(path.toStdWString().data(), 0, 0, nullptr,
                                        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
         if (handle != INVALID_HANDLE_VALUE) {
-            return FileHandle(handle, [](HANDLE h) { CloseHandle(h); });
+            return {handle, [](HANDLE h) { CloseHandle(h); }};
         }
     }