From cb606ef75fc401286bee53fa90b705f1a1773ffb Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Fri, 13 Oct 2023 12:43:59 +0200 Subject: [PATCH] correctly handle output zip files in directories --- src/pfaedle/gtfs/Writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pfaedle/gtfs/Writer.cpp b/src/pfaedle/gtfs/Writer.cpp index 0380fc1..6cbde63 100644 --- a/src/pfaedle/gtfs/Writer.cpp +++ b/src/pfaedle/gtfs/Writer.cpp @@ -50,7 +50,7 @@ void Writer::write(gtfs::Feed* sourceFeed, const std::string& path) const { if (toZip) { const size_t slashIdx = path.rfind('/'); if (slashIdx != std::string::npos) { - zipFileName = path.substr(slashIdx, -1); + zipFileName = path.substr(slashIdx + 1, -1); gtfsPath = path.substr(0, slashIdx); } else { zipFileName = path;