diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-20 13:11:59 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-20 13:11:59 +0200 |
commit | c1db97f057e8f20aa26a2342da94eeff1d7a7725 (patch) | |
tree | b795e75ba14bb2b9cab0fbc6aad01cd76b892939 /src/AsyncImageLoader.cpp | |
parent | 5465c09cd108e37720dbad139de98bdcf5dfe8bf (diff) |
Proper atomic rename? also do not generate mipmap for manga
Diffstat (limited to 'src/AsyncImageLoader.cpp')
-rw-r--r-- | src/AsyncImageLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp index 1c676c1..34df062 100644 --- a/src/AsyncImageLoader.cpp +++ b/src/AsyncImageLoader.cpp @@ -24,7 +24,7 @@ namespace QuickMedia { const char *args[] = { "convert", thumbnail_path_first_frame.data.c_str(), "-thumbnail", new_size.c_str(), result_path_tmp.data.c_str(), nullptr}; int convert_res = exec_program(args, nullptr, nullptr); - if(convert_res == 0 && rename(result_path_tmp.data.c_str(), thumbnail_path_resized.data.c_str()) == 0) + if(convert_res == 0 && rename_atomic(result_path_tmp.data.c_str(), thumbnail_path_resized.data.c_str()) == 0) return true; else return false; |