From ca69c443acd035bb6b7a3e6df7a975a9908c4f42 Mon Sep 17 00:00:00 2001 From: Dustin Knopoff Date: Fri, 21 Dec 2018 21:19:13 -0500 Subject: [PATCH] fix(Windows support re-added): --- src/docs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/docs.rs b/src/docs.rs index 6f32764..11d0505 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -327,7 +327,11 @@ mod docfile { /// Given a file path and delimiters, generate a DocFile for all files requested. pub fn start(p: &Path, delims: Delimiters) -> Vec { if p.is_dir() || p.to_str().unwrap().contains("*") { - let pth = home_dir().unwrap().join(p.strip_prefix("~").unwrap()); + let pth = if cfg!(windows) { + p.to_path_buf() + } else { + home_dir().unwrap().join(p.strip_prefix("~").unwrap()) + }; let files: Vec<_> = glob(pth.to_str().unwrap()) .unwrap() .filter_map(|x| x.ok())