From 6e88eaef69b718048cd8a8b1d1cd8b7dbc8704cc Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 31 Jan 2017 02:15:37 +0000 Subject: [PATCH] Fix a path construction issue introduced in 3fc85b7. --- src/platform/climain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/climain.cpp b/src/platform/climain.cpp index c8cae597..ddb61661 100644 --- a/src/platform/climain.cpp +++ b/src/platform/climain.cpp @@ -309,7 +309,9 @@ static bool RunCommand(const std::vector args) { if(replaceAt != std::string::npos) { std::string outputSubst; outputSubst = Dirname(inputFile); - outputSubst += PATH_SEP; + if(!outputSubst.empty()) { + outputSubst += PATH_SEP; + } outputSubst += Basename(inputFile, /*stripExtension=*/true); outputFile.replace(replaceAt, 1, outputSubst); }