Skip to content

Commit fa09159

Browse files
authored
Merge pull request #195 from DenisKolodin/win-path-fix
Win path fix
2 parents f3a49ed + cb09419 commit fa09159

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cobalt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::fs::{self, File};
22
use std::collections::HashMap;
33
use std::io::Write;
4-
use std::path::Path;
4+
use std::path::{self, Path};
55
use std::ffi::OsStr;
66
use liquid::Value;
77
use walkdir::{WalkDir, DirEntry, WalkDirIterator};
@@ -188,7 +188,7 @@ pub fn build(config: &Config) -> Result<()> {
188188
} else {
189189
try!(entry_path.split(source_str)
190190
.last()
191-
.map(|s| s.trim_left_matches("/"))
191+
.map(|s| s.trim_left_matches(path::MAIN_SEPARATOR))
192192
.ok_or("Empty path"))
193193
};
194194

0 commit comments

Comments
 (0)