Fixed cipher import, created missing data structs instead of using generic Value, and fixed some warnings

This commit is contained in:
Daniel García
2018-02-23 00:38:54 +01:00
parent c8b45f5fe5
commit dfefbf1f31
13 changed files with 190 additions and 131 deletions

View File

@@ -61,7 +61,9 @@ pub fn delete_file(path: &str) -> bool {
let res = fs::remove_file(path).is_ok();
if let Some(parent) = Path::new(path).parent() {
fs::remove_dir(parent); // Only removes if the directory is empty
// If the directory isn't empty, this returns an error, which we ignore
// We only want to delete the folder if it's empty
fs::remove_dir(parent).ok();
}
res