Skip to content

Commit

Permalink
Merge pull request #760 from CanalTP/create-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean SIMARD committed Mar 31, 2021
2 parents 2f53336 + 1578705 commit 9c25dc6
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Kisio Digital <team.coretools@kisio.com>", "Guillaume Pinot <texitoi@texitoi.eu>"]
name = "transit_model"
version = "0.34.1"
version = "0.35.0"
license = "AGPL-3.0-only"
description = "Transit data management"
repository = "https://github.com/CanalTP/transit_model"
Expand Down
2 changes: 1 addition & 1 deletion gtfs2netexfr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../", features = ["proj"] }
transit_model = { version = "0.35", path = "../", features = ["proj"] }
lazy_static = "1"
2 changes: 1 addition & 1 deletion gtfs2ntfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../" }
transit_model = { version = "0.35", path = "../" }
lazy_static = "1"
2 changes: 1 addition & 1 deletion ntfs2gtfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../" }
transit_model = { version = "0.35", path = "../" }
lazy_static = "1"
2 changes: 1 addition & 1 deletion ntfs2netexfr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../", features = ["proj"] }
transit_model = { version = "0.35", path = "../", features = ["proj"] }
lazy_static = "1"
2 changes: 1 addition & 1 deletion ntfs2ntfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../" }
transit_model = { version = "0.35", path = "../" }
lazy_static = "1"
2 changes: 1 addition & 1 deletion restrict-validity-period/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.34", path = "../" }
transit_model = { version = "0.35", path = "../" }
1 change: 1 addition & 0 deletions src/gtfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ pub fn write<P: AsRef<Path>>(model: Model, path: P) -> Result<()> {
let collections = remove_stop_zones(model);
let model = Model::new(collections)?;
let path = path.as_ref();
std::fs::create_dir_all(path)?;
info!("Writing GTFS to {:?}", path);

write::write_transfers(path, &model.transfers)?;
Expand Down
1 change: 1 addition & 0 deletions src/netex_france/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ impl<'a> Exporter<'a> {
where
P: AsRef<Path>,
{
std::fs::create_dir_all(&path)?;
self.write_lines(&path)?;
self.write_stops(&path)?;
self.write_calendars(&path)?;
Expand Down
1 change: 1 addition & 0 deletions src/ntfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ pub fn write<P: AsRef<path::Path>>(
current_datetime: DateTime<FixedOffset>,
) -> Result<()> {
let path = path.as_ref();
std::fs::create_dir_all(path)?;
info!("Writing NTFS to {:?}", path);

write::write_feed_infos(path, &model, current_datetime)?;
Expand Down

0 comments on commit 9c25dc6

Please sign in to comment.