[fractal] delete temporary thumbnail file
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] delete temporary thumbnail file
- Date: Sun, 24 Feb 2019 13:33:52 +0000 (UTC)
commit 9eb315a816bc93520091506369e04b940ee81bb8
Author: mairandomness <mairakodama gmail com>
Date: Mon Feb 18 21:30:53 2019 -0500
delete temporary thumbnail file
fractal-matrix-api/src/backend/room.rs | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/fractal-matrix-api/src/backend/room.rs b/fractal-matrix-api/src/backend/room.rs
index de13b9b6..2349509d 100644
--- a/fractal-matrix-api/src/backend/room.rs
+++ b/fractal-matrix-api/src/backend/room.rs
@@ -490,6 +490,9 @@ pub fn attach_file(bk: &Backend, mut msg: Message) -> Result<(), Error> {
msg.extra_content = Some(serde_json::to_value(&extra_content).unwrap());
}
}
+ if let Err(_e) = std::fs::remove_file(&thumb) {
+ error!("Can't remove thumbnail: {}", thumb);
+ }
}
match upload_file(&tk, &baseu, &fname) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]