Skip to content

Commit cb09419

Browse files
committed
Use the system dependent path separator
1 parent 61429aa commit cb09419

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)