correctly handle output zip files in directories
This commit is contained in:
parent
7a772486d0
commit
cb606ef75f
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ void Writer::write(gtfs::Feed* sourceFeed, const std::string& path) const {
|
||||||
if (toZip) {
|
if (toZip) {
|
||||||
const size_t slashIdx = path.rfind('/');
|
const size_t slashIdx = path.rfind('/');
|
||||||
if (slashIdx != std::string::npos) {
|
if (slashIdx != std::string::npos) {
|
||||||
zipFileName = path.substr(slashIdx, -1);
|
zipFileName = path.substr(slashIdx + 1, -1);
|
||||||
gtfsPath = path.substr(0, slashIdx);
|
gtfsPath = path.substr(0, slashIdx);
|
||||||
} else {
|
} else {
|
||||||
zipFileName = path;
|
zipFileName = path;
|
||||||
|
|
Loading…
Reference in a new issue