Skip to content

Commit

Permalink
fix(Windows support re-added):
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinknopoff committed Dec 22, 2018
1 parent 93fb2c2 commit ca69c44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DocFile> {
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())
Expand Down

0 comments on commit ca69c44

Please sign in to comment.