|
|
|
@ -60,7 +60,11 @@ fn main() {
|
|
|
|
|
if filename.ends_with("/") { |
|
|
|
|
files_dirs.insert(filename.clone()); |
|
|
|
|
} else { |
|
|
|
|
directory_files.insert(Path::new(filename).parent().unwrap().to_str().unwrap().to_string() + "/"); |
|
|
|
|
let mut path = Path::new(filename); |
|
|
|
|
while path.parent().is_some() { |
|
|
|
|
directory_files.insert(path.parent().unwrap().to_str().unwrap().to_string() + "/"); |
|
|
|
|
path = path.parent().unwrap(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|