aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Smith <sesmith177@gmail.com>2018-08-13 17:17:33 -0400
committerSam Smith <sesmith177@gmail.com>2018-08-13 17:17:33 -0400
commitbf784289d280f9c85167c2fbe497ef0a5ec17568 (patch)
tree778ce603382fe66b00e1b1a9e24eef2d8ce31fdd /src
parent84963a55110dd5e95d6d4d90fbe48b4a2addc4ff (diff)
downloadprotobuf-bf784289d280f9c85167c2fbe497ef0a5ec17568.tar.gz
protobuf-bf784289d280f9c85167c2fbe497ef0a5ec17568.tar.bz2
protobuf-bf784289d280f9c85167c2fbe497ef0a5ec17568.zip
Always spilt on '\' and '/'
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 12dec9c2..a1f3bafc 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -168,12 +168,8 @@ bool VerifyDirectoryExists(const string& path) {
// directories listed in |filename|.
bool TryCreateParentDirectory(const string& prefix, const string& filename) {
// Recursively create parent directories to the output file.
-#if defined(_WIN32)
- // on Windows, both '/' and '\' are valid path separators
+ // On Windows, both '/' and '\' are valid path separators.
std::vector<string> parts = Split(filename, "/\\", true);
-#else
- std::vector<string> parts = Split(filename, "/", true);
-#endif
string path_so_far = prefix;
for (int i = 0; i < parts.size() - 1; i++) {
path_so_far += parts[i];