summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-05-17 15:17:46 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-05-17 15:17:46 +0200
commit8ae82dc89a1d3e1acabad540cbbdd9db56add29e (patch)
tree80c08c1e89e05e5b8e78d92c8707743082ba9cbf
parent2cec2b2d55e31c78ab5c98f23fa85f7ba400b71e (diff)
openpgp: Use `/` to separate path components in the test map.
- Fixes the tests on *ALL* platforms that do not use `/` as a directory separator. - Fixes #276.
-rw-r--r--openpgp/build.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/build.rs b/openpgp/build.rs
index 18cf91db..720d63d2 100644
--- a/openpgp/build.rs
+++ b/openpgp/build.rs
@@ -34,7 +34,9 @@ fn include_test_data() -> io::Result<()> {
if path.is_file() {
writeln!(
&mut sink, " add!({:?}, {:?});",
- path.components().skip(2).collect::<PathBuf>(),
+ path.components().skip(2)
+ .map(|c| c.as_os_str().to_str().expect("valid UTF-8"))
+ .collect::<Vec<_>>().join("/"),
cwd.join(path))?;
} else if path.is_dir() {
dirs.push(path.clone());