equal
deleted
inserted
replaced
146 if (DirectoryExists(DirectoryName) == true) { |
146 if (DirectoryExists(DirectoryName) == true) { |
147 #ifdef WINDOWS |
147 #ifdef WINDOWS |
148 SHFILEOPSTRUCTW fos = {0}; |
148 SHFILEOPSTRUCTW fos = {0}; |
149 TString directoryName = FixPathForPlatform(DirectoryName); |
149 TString directoryName = FixPathForPlatform(DirectoryName); |
150 DynamicBuffer<TCHAR> lDirectoryName(directoryName.size() + 2); |
150 DynamicBuffer<TCHAR> lDirectoryName(directoryName.size() + 2); |
|
151 if (lDirectoryName.GetData() == NULL) { |
|
152 return false; |
|
153 } |
151 memcpy(lDirectoryName.GetData(), directoryName.data(), (directoryName.size() + 2) * sizeof(TCHAR)); |
154 memcpy(lDirectoryName.GetData(), directoryName.data(), (directoryName.size() + 2) * sizeof(TCHAR)); |
152 lDirectoryName[directoryName.size() + 1] = NULL; |
155 lDirectoryName[directoryName.size() + 1] = NULL; |
153 // Double null terminate for SHFileOperation. |
156 // Double null terminate for SHFileOperation. |
154 |
157 |
155 // Delete the folder and everything inside. |
158 // Delete the folder and everything inside. |