2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 11:21:24 +00:00

Use safe_move_file to create thumbnail image

This commit is contained in:
Aode (lion) 2021-08-29 12:12:22 -05:00
parent c5680c8caf
commit 3066e4d350
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -995,7 +995,7 @@ dependencies = [
[[package]]
name = "pict-rs"
version = "0.3.0-alpha.16"
version = "0.3.0-alpha.17"
dependencies = [
"actix-form-data",
"actix-fs",

View file

@ -1,7 +1,7 @@
[package]
name = "pict-rs"
description = "A simple image hosting service"
version = "0.3.0-alpha.16"
version = "0.3.0-alpha.17"
authors = ["asonix <asonix@asonix.dog>"]
license = "AGPL-3.0"
readme = "README.md"

View file

@ -405,7 +405,7 @@ async fn process(
actix_fs::copy(original_path, orig_file.clone()).await?;
magick::process_image(&orig_file, &dest_file, thumbnail_args, format).await?;
actix_fs::remove_file(orig_file).await?;
actix_fs::rename(dest_file, thumbnail_path.clone()).await?;
safe_move_file(dest_file, thumbnail_path.clone()).await?;
let details = if let Some(details) = details {
details