From e838f6595ead46bf00ba3183099985cdfa268966 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Mon, 13 Mar 2017 19:12:13 -0500 Subject: [PATCH] Only create if directory is not found --- SiaDrive.Dokan.Api/SiaDokanDrive.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SiaDrive.Dokan.Api/SiaDokanDrive.cpp b/SiaDrive.Dokan.Api/SiaDokanDrive.cpp index 0563ed9..b60d6ab 100644 --- a/SiaDrive.Dokan.Api/SiaDokanDrive.cpp +++ b/SiaDrive.Dokan.Api/SiaDokanDrive.cpp @@ -397,7 +397,10 @@ private: subCachePath.resize(MAX_PATH + 1); ::PathAppend(&subCachePath[0], dir.c_str()); subCachePath = subCachePath.c_str(); - ::CreateDirectory(subCachePath.c_str(), nullptr); + if (!::PathIsDirectory(subCachePath.c_str())) + { + ::CreateDirectory(subCachePath.c_str(), nullptr); + } } auto fileList = siaFileTree->Query(siaQuery); @@ -539,6 +542,7 @@ private: { UNREFERENCED_PARAMETER(DokanFileInfo); + // TODO Implement this correctly *FreeBytesAvailable = (ULONGLONG)(512 * 1024 * 1024); *TotalNumberOfBytes = 9223372036854775807; *TotalNumberOfFreeBytes = 9223372036854775807;