diff --git a/engine/plateau-gis-quality-checker/src-tauri/embed/workflows/luse-urf.yml b/engine/plateau-gis-quality-checker/src-tauri/embed/workflows/luse-urf.yml index e864d4f43..1ffcf6806 100644 --- a/engine/plateau-gis-quality-checker/src-tauri/embed/workflows/luse-urf.yml +++ b/engine/plateau-gis-quality-checker/src-tauri/embed/workflows/luse-urf.yml @@ -748,7 +748,7 @@ graphs: with: format: tsv output: | - file::join_path(file::join_path(env.get("outputPath"), env.get("__value").destDataset), "不正な面の向きエラー.tsv") + file::join_path(env.get("outputPath"), "不正な面の向きエラー.tsv") - id: 0c30b482-b241-4d47-9a88-175c5f98ff8d name: AttributeMapperInvalidSurface type: action @@ -783,7 +783,7 @@ graphs: with: format: tsv output: | - file::join_path(file::join_path(env.get("outputPath"), env.get("__value").destDataset), "不正な面エラー.tsv") + file::join_path(env.get("outputPath"), "不正な面エラー.tsv") - id: e51e64b4-6cc0-4698-b677-e5f7f667f24f name: FeatureMerger type: action diff --git a/engine/plateau-gis-quality-checker/src-tauri/src/handler.rs b/engine/plateau-gis-quality-checker/src-tauri/src/handler.rs index 50384dee3..0ac84b7ac 100644 --- a/engine/plateau-gis-quality-checker/src-tauri/src/handler.rs +++ b/engine/plateau-gis-quality-checker/src-tauri/src/handler.rs @@ -23,10 +23,6 @@ pub(crate) struct QualityCheckWorkflow { pub(crate) static QUALITY_CHECK_WORKFLOWS: Lazy> = Lazy::new(|| { vec![ - QualityCheckWorkflow { - id: "common".to_string(), - name: "共通".to_string(), - }, QualityCheckWorkflow { id: "tran-rwy-trk-squr-wwy".to_string(), name: "道路".to_string(), diff --git a/engine/runtime/common/src/uri.rs b/engine/runtime/common/src/uri.rs index b7d655de6..12c81318c 100644 --- a/engine/runtime/common/src/uri.rs +++ b/engine/runtime/common/src/uri.rs @@ -99,6 +99,11 @@ pub struct Uri { } impl Uri { + pub fn separator(&self) -> String { + let sep = self.protocol.separator(); + sep.to_string() + } + pub fn for_test(uri: &str) -> Self { Self::from_str(uri).unwrap() } @@ -157,16 +162,27 @@ impl Uri { pub fn path(&self) -> PathBuf { let p = &self.uri[self.protocol.as_str().len() + PROTOCOL_SEPARATOR.len()..]; - let sub_path = p - .split(self.protocol.separator()) - .skip(1) - .collect::>() - .join("/") - .to_string(); - if self.is_dir() { - PathBuf::from(format!("/{}/", sub_path)) - } else { - PathBuf::from(format!("/{}", sub_path)) + match self.protocol { + Protocol::Google | Protocol::Http | Protocol::Https => PathBuf::from(format!( + "{}{}", + self.separator().as_str(), + p.split(self.protocol.separator()) + .skip(1) + .collect::>() + .join(self.separator().as_str()) + )), + Protocol::File | Protocol::Ram => { + let sub_path = p + .split(self.protocol.separator()) + .collect::>() + .join(self.separator().as_str()) + .to_string(); + if self.is_dir() { + PathBuf::from(format!("{}{}", sub_path, self.separator().as_str())) + } else { + PathBuf::from(sub_path) + } + } } } @@ -609,7 +625,7 @@ mod tests { #[test] fn test_sub_path() { assert_eq!( - Uri::for_test("file:///foo/hoge")._path(), + Uri::for_test("file:///foo/hoge").path(), PathBuf::from_str("/foo/hoge").unwrap() ); assert_eq!(