Address reviewer comments.
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 5b4fc13..4ae1ba6 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -1432,14 +1432,14 @@
#if defined(_WIN32)
// On Windows, the shell (typically cmd.exe) does not expand wildcards in
// file names (e.g. foo\*.proto), so we do it ourselves.
- switch (google::protobuf::internal::win32::expand_wildcards(
+ switch (google::protobuf::io::win32::expand_wildcards(
value,
[this](const string& path) {
this->input_files_.push_back(path);
})) {
- case google::protobuf::internal::win32::ExpandWildcardsResult::kSuccess:
+ case google::protobuf::io::win32::ExpandWildcardsResult::kSuccess:
break;
- case google::protobuf::internal::win32::ExpandWildcardsResult::kErrorNoMatchingFile:
+ case google::protobuf::io::win32::ExpandWildcardsResult::kErrorNoMatchingFile:
// Path does not exist, is not a file, or it's longer than MAX_PATH and
// long path handling is disabled.
std::cerr << "Invalid file name pattern or missing input file \""
diff --git a/src/google/protobuf/io/io_win32.cc b/src/google/protobuf/io/io_win32.cc
index 59f3ec5..f6ad537 100755
--- a/src/google/protobuf/io/io_win32.cc
+++ b/src/google/protobuf/io/io_win32.cc
@@ -362,7 +362,7 @@
return as_windows_path(path, &wpath) ? wpath : wstring();
}
-bool expand_wildcards(
+int expand_wildcards(
const string& path, std::function<void(const string&)> consume) {
if (path.find_first_of("*?") == string::npos) {
// There are no wildcards in the path, we don't need to expand it.
diff --git a/src/google/protobuf/io/io_win32.h b/src/google/protobuf/io/io_win32.h
index ae6ed0a..6d4362c 100755
--- a/src/google/protobuf/io/io_win32.h
+++ b/src/google/protobuf/io/io_win32.h
@@ -92,12 +92,8 @@
// in the last path segment. This function passes all matching file names to
// `consume`. The resulting paths may not be absolute nor normalized.
//
-// The function returns true if the path did not contain any wildcards (in
-// which case the path may or may not exist), or the path did contain wildcards
-// and it matched at least one file.
-// The function returns false if the path contained wildcards but it did not
-// match any files.
-LIBPROTOBUF_EXPORT bool expand_wildcards(
+// The function returns a value from `ExpandWildcardsResult`.
+LIBPROTOBUF_EXPORT int expand_wildcards(
const std::string& path, std::function<void(const std::string&)> consume);
namespace strings {