Skip to content

Commit ca69c44

Browse files
committed
fix(Windows support re-added):
1 parent 93fb2c2 commit ca69c44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/docs.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ mod docfile {
327327
/// Given a file path and delimiters, generate a DocFile for all files requested.
328328
pub fn start(p: &Path, delims: Delimiters) -> Vec<DocFile> {
329329
if p.is_dir() || p.to_str().unwrap().contains("*") {
330-
let pth = home_dir().unwrap().join(p.strip_prefix("~").unwrap());
330+
let pth = if cfg!(windows) {
331+
p.to_path_buf()
332+
} else {
333+
home_dir().unwrap().join(p.strip_prefix("~").unwrap())
334+
};
331335
let files: Vec<_> = glob(pth.to_str().unwrap())
332336
.unwrap()
333337
.filter_map(|x| x.ok())

0 commit comments

Comments
 (0)