Use RemoveFile instead of DeleteFile in fs.

Windows defines DeleteFile to DeleteFileA/W, causing confusion.
This commit is contained in:
Unknown W. Brackets
2013-02-08 10:26:33 -08:00
parent 0a1b3c296b
commit 1759bb8051
7 changed files with 10 additions and 14 deletions
+2 -5
View File
@@ -31,9 +31,6 @@
#endif
#undef DeleteFile
#if HOST_IS_CASE_SENSITIVE
static bool FixFilenameCase(const std::string &path, std::string &filename)
@@ -248,7 +245,7 @@ bool DirectoryFileSystem::RenameFile(const std::string &from, const std::string
return retValue;
}
bool DirectoryFileSystem::DeleteFile(const std::string &filename) {
bool DirectoryFileSystem::RemoveFile(const std::string &filename) {
std::string fullName = GetLocalPath(filename);
#ifdef _WIN32
bool retValue = (::DeleteFileA(fullName.c_str()) == TRUE);
@@ -266,7 +263,7 @@ bool DirectoryFileSystem::DeleteFile(const std::string &filename) {
fullName = GetLocalPath(fullName);
#ifdef _WIN32
retValue = (::DeleteFile(fullName.c_str()) == TRUE);
retValue = (::DeleteFileA(fullName.c_str()) == TRUE);
#else
retValue = (0 == unlink(fullName.c_str()));
#endif