Skip to content

Commit

Permalink
Fix CreateTransitScheduleFromGtfs on Windows #2 (#2507)
Browse files Browse the repository at this point in the history
* fix windows paths again

* use filename utils
  • Loading branch information
rakow committed Apr 11, 2023
1 parent cdb63de commit a76d70e
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,6 +1,7 @@
package org.matsim.application.prepare.pt;

import com.conveyal.gtfs.model.Stop;
import org.apache.commons.io.FilenameUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.Coord;
Expand Down Expand Up @@ -101,8 +102,7 @@ public Integer call() throws Exception {
// Output files
File scheduleFile = new File(output, name + "-transitSchedule.xml.gz");
File networkPTFile = new File(output,
Path.of(IOUtils.resolveFileOrResource(networkFile).getPath())
.getFileName().toString()
FilenameUtils.getName(IOUtils.resolveFileOrResource(networkFile).getPath())
.replace(".xml", "-with-pt.xml"));
File transitVehiclesFile = new File(output, name + "-transitVehicles.xml.gz");

Expand Down

0 comments on commit a76d70e

Please sign in to comment.