aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/testing
diff options
context:
space:
mode:
authorGravatar Wei-Yin Chen (陳威尹) <wychen@chromium.org>2016-08-19 15:25:54 -0700
committerGravatar Wei-Yin Chen (陳威尹) <wychen@chromium.org>2016-08-31 17:28:51 -0700
commit588a803d586447582b8398a92c3d93808f80e285 (patch)
treef6155be17ab2bfc9e4d0b901d9c0456be70a9f55 /src/google/protobuf/testing
parentb9649765f8e5c85523c138ac990a7523a54bfdbe (diff)
Support Unicode build on Windows
Diffstat (limited to 'src/google/protobuf/testing')
-rw-r--r--src/google/protobuf/testing/file.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc
index bc76c844..470512ed 100644
--- a/src/google/protobuf/testing/file.cc
+++ b/src/google/protobuf/testing/file.cc
@@ -141,12 +141,12 @@ void File::DeleteRecursively(const string& name,
#ifdef _MSC_VER
// This interface is so weird.
- WIN32_FIND_DATA find_data;
- HANDLE find_handle = FindFirstFile((name + "/*").c_str(), &find_data);
+ WIN32_FIND_DATAA find_data;
+ HANDLE find_handle = FindFirstFileA((name + "/*").c_str(), &find_data);
if (find_handle == INVALID_HANDLE_VALUE) {
// Just delete it, whatever it is.
- DeleteFile(name.c_str());
- RemoveDirectory(name.c_str());
+ DeleteFileA(name.c_str());
+ RemoveDirectoryA(name.c_str());
return;
}
@@ -156,15 +156,15 @@ void File::DeleteRecursively(const string& name,
string path = name + "/" + entry_name;
if (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
DeleteRecursively(path, NULL, NULL);
- RemoveDirectory(path.c_str());
+ RemoveDirectoryA(path.c_str());
} else {
- DeleteFile(path.c_str());
+ DeleteFileA(path.c_str());
}
}
- } while(FindNextFile(find_handle, &find_data));
+ } while(FindNextFileA(find_handle, &find_data));
FindClose(find_handle);
- RemoveDirectory(name.c_str());
+ RemoveDirectoryA(name.c_str());
#else
// Use opendir()! Yay!
// lstat = Don't follow symbolic links.