Skip to content

Commit faa754d

Browse files
committed
fix windows by removing unsupported dir characters
1 parent 1d4a2e7 commit faa754d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/data_types.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,12 @@ pub struct DataDirMnemonic<'a> {
183183
impl<'a> DataDir<'a> {
184184
pub fn challenge_dir(&'a self, base_dir: &str, challenge_id: &str) -> Result<PathBuf, String> {
185185
let mut path = PathBuf::from(base_dir);
186-
path.push(challenge_id);
186+
if cfg!(target_os = "windows") {
187+
// Directories with '*' are not supported on windows
188+
path.push(challenge_id.replace("*", ""));
189+
} else {
190+
path.push(challenge_id);
191+
}
187192
Ok(path)
188193
}
189194

0 commit comments

Comments
 (0)