Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion native-src/sync_root_interface/SyncRoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,21 @@ void SyncRoot::DehydrateFile(const wchar_t *filePath)

if (FAILED(hr))
{
wprintf(L"Error dehydrating file %ls\n", filePath);
DWORD err = HRESULT_CODE(hr);
if (err == ERROR_SHARING_VIOLATION || err == ERROR_CLOUD_FILE_IN_USE)
{
wprintf(L"Cannot dehydrate because the file is currently in use: %ls\n", filePath);

MessageBoxW(
nullptr,
L"Unable to free up space because the file is currently in use.\nPlease close the file and try again.",
L"File in use",
MB_OK | MB_ICONWARNING | MB_SYSTEMMODAL);
}
else
{
wprintf(L"Error dehydrating file %ls\n", filePath);
}
// Logger::getInstance().log("Error dehydrating file " + Logger::fromWStringToString(filePath), LogLevel::ERROR);
}
else
Expand Down
Loading