Fixes
This commit is contained in:
@@ -66,4 +66,10 @@ void CAutoThread::StopAutoThread()
|
||||
_thread->join();
|
||||
_thread.reset(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CAutoThread::IsRunning() const
|
||||
{
|
||||
return (_thread != nullptr);
|
||||
}
|
@@ -860,7 +860,7 @@ private:
|
||||
// Paging IO cannot write after allocate file size.
|
||||
if (dokanFileInfo->PagingIo)
|
||||
{
|
||||
if (static_cast<UINT64>(offset) >= li.QuadPart)
|
||||
if (offset >= li.QuadPart)
|
||||
{
|
||||
*bytesWritten = 0;
|
||||
if (opened)
|
||||
@@ -868,7 +868,7 @@ private:
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (static_cast<UINT64>(offset + bytesToWrite) > li.QuadPart)
|
||||
if ((offset + bytesToWrite) > li.QuadPart)
|
||||
{
|
||||
UINT64 bytes = li.QuadPart - offset;
|
||||
if (bytes >> 32)
|
||||
@@ -882,7 +882,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
if (static_cast<UINT64>(offset) > li.QuadPart)
|
||||
if (offset > li.QuadPart)
|
||||
{
|
||||
// In the mirror sample helperZeroFileData is not necessary. NTFS will
|
||||
// zero a hole.
|
||||
@@ -979,30 +979,30 @@ private:
|
||||
dokanFileInfo->Context = 0;
|
||||
}
|
||||
|
||||
if (dokanFileInfo->DeleteOnClose)
|
||||
{
|
||||
// Should already be deleted by CloseHandle
|
||||
// if open with FILE_FLAG_DELETE_ON_CLOSE
|
||||
if (dokanFileInfo->IsDirectory)
|
||||
{
|
||||
if (RetryableAction(filePath.RemoveDirectory(), DEFAULT_RETRY_COUNT, DEFAULT_RETRY_DELAY_MS))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dokanFileInfo->DeleteOnClose)
|
||||
{
|
||||
// Should already be deleted by CloseHandle
|
||||
// if open with FILE_FLAG_DELETE_ON_CLOSE
|
||||
if (dokanFileInfo->IsDirectory)
|
||||
{
|
||||
if (RetryableAction(filePath.RemoveDirectory(), DEFAULT_RETRY_COUNT, DEFAULT_RETRY_DELAY_MS))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RetryableAction(filePath.RemoveDirectory(), DEFAULT_RETRY_COUNT, DEFAULT_RETRY_DELAY_MS))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
RefreshActiveFileTree(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static NTSTATUS DOKAN_CALLBACK Sia_FlushFileBuffers(LPCWSTR fileName, PDOKAN_FILE_INFO dokanFileInfo)
|
||||
|
Reference in New Issue
Block a user