diff options
author | Ben S <ogham@bsago.me> | 2014-11-24 17:03:36 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2014-11-24 17:03:36 +0000 |
commit | cbd2f1fa37c2e0f33ecd27fb3c01edcb1182d37f (patch) | |
tree | 3b77be0c731e3505a6cd2a31975def603379dd93 /src/dir.rs | |
parent | c7417e0bca3cac9d4059f06dd0f2836573284a6c (diff) |
List files and directories separately
This finally fixes the issue where trying to list a file causes a crash. Also, tidy up some of the uses of references.
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -24,7 +24,7 @@ impl<'a> Dir<'a> { let mut files = vec![]; for path in self.contents.iter() { - match File::from_path(path, self) { + match File::from_path(path.clone(), Some(self)) { Ok(file) => files.push(file), Err(e) => println!("{}: {}", path.display(), e), } |