Skip to content

Commit d4b8712

Browse files
committed
Hack the file urls into something that might work on Windows.
1 parent 3e335d1 commit d4b8712

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ impl<'a> Generator<'a> {
6363
out_directory
6464
.as_ref()
6565
.canonicalize()
66-
.unwrap_or(out_directory.as_ref().to_owned())
66+
.unwrap_or_else(|_| out_directory.as_ref().to_owned())
6767
.display()
6868
.to_string()
6969
.trim_start_matches('/')
7070
.replace(' ', "%20")
71+
.replace("\\\\?\\", "")
72+
.replace(std::path::MAIN_SEPARATOR, "/")
7173
);
7274

7375
Ok(Generator {

0 commit comments

Comments
 (0)