Skip to content

Commit

Permalink
Remove cached previews when deleting files (closes #54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samasaur1 committed Jan 28, 2024
1 parent 3e41390 commit e000eb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ pub(crate) async fn delete_file(obj: IdOnly, repos: Arc<Mutex<HashMap<Uuid, Repo
match fs::remove_dir_all(FILES_DIR().join(uuid_string)) {
Ok(_) => {
log::info!(target: "remote_text_server::delete_file", "[{}] Target directory successfully removed", &obj.id);
let _ = fs::remove_dir_all(PREVIEWS_DIR().join(uuid_string));
return Ok(Box::new(StatusCode::OK))
},
Err(_) => {
Expand Down

0 comments on commit e000eb5

Please sign in to comment.