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

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

No files matched your search

+3 -1
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