commit 7c4926b8feb208527f946607f22f6e8bfcb52f82
parent 0bf715057339239463139b3831f73d5c9d2f66c6
Author: Fabian Wermelinger <fabianw@mavt.ethz.ch>
Date: Fri, 22 Sep 2017 16:36:30 +0200
bug fix for output filename (rel and abs paths)
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/apps/polaroidCamera/SceneProcessor.h b/apps/polaroidCamera/SceneProcessor.h
@@ -44,6 +44,7 @@ private:
char const* pch = str.c_str();
char const* start = pch;
+ int shift = 0;
for(; *pch; ++pch)
{
if (delimiters.find(*pch) != delimiters.end())
@@ -53,11 +54,12 @@ private:
std::string subpath(start, pch);
path += subpath;
start = pch;
+ shift = 1;
}
}
}
result.push_back(path);
- result.push_back(start+1);
+ result.push_back(start+shift);
return result;
}
@@ -66,10 +68,9 @@ private:
const std::vector<std::string> splitp = _splitpath(input, delim);
std::ostringstream output;
if (m_parser.exist("outpath"))
- output << m_parser("outpath").asString();
+ output << m_parser("outpath").asString() << delim << splitp[1];
else
- output << splitp[0];
- output << delim << splitp[1];
+ output << splitp[1];
return output.str();
}