mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-11 03:05:58 +03:00
Fixed cipher import, created missing data structs instead of using generic Value, and fixed some warnings
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user