aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/command_line_interface.cc
diff options
context:
space:
mode:
authorBo Yang <paulyang1211@gmail.com>2015-02-09 11:57:41 -0800
committerBo Yang <paulyang1211@gmail.com>2015-02-09 11:57:41 -0800
commiteb2ce0293138532680fdd3647c01db7587b9367b (patch)
treebe85bbb783aeb2164de73a6a7c7a85add055e10b /src/google/protobuf/compiler/command_line_interface.cc
parente2555e235f867f3d7a0378e95a45109c8fd2dfbe (diff)
downloadprotobuf-eb2ce0293138532680fdd3647c01db7587b9367b.tar.gz
protobuf-eb2ce0293138532680fdd3647c01db7587b9367b.tar.bz2
protobuf-eb2ce0293138532680fdd3647c01db7587b9367b.zip
Fix absolute/relative path in output
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface.cc')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index ddd58e2d..4095b3c9 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -1344,7 +1344,11 @@ bool CommandLineInterface::GenerateDependencyManifestFile(
vector<string> relative_output_filenames;
directory->GetOutputFilenames(&relative_output_filenames);
for (int i = 0; i < relative_output_filenames.size(); i++) {
- output_filenames.push_back(location + relative_output_filenames[i]);
+ string output_filename = location + relative_output_filenames[i];
+ if (output_filename.compare(0, 2, "./") == 0) {
+ output_filename = output_filename.substr(2);
+ }
+ output_filenames.push_back(output_filename);
}
}