-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files getting deleted if compression fails #116
Comments
Seems like you're trying to compress images in place, right? Caesium creates a temp file and tries to overwrite the original, but the copy is failing. I'll investigate, thanks! |
Yes indeed. I just want to overwrite the original ones. |
I just lost more than 10,000 images because of this bug. XD |
Found the reason: if you try to overwrite the original file and the compressed is bigger, the compression fails and the original file gets deleted. I'm going to fix it asap as this is a critical bug. |
could you release the fix ? |
I have a fix on b27a397. I think I can make a rc.2 release in the next couple of days. |
RC.2 released, should be fixed - make a backup save just to be extra sure before giving a try. |
Describe the bug
The Software deletes images, when compression fails.
Software version
Caesium Image Compressor 2.0.0 rc1
Operating System information
WIN 11
To Reproduce
Steps to reproduce the behavior:
Compress attached files with Caesium 2.0.0. RC1
Expected behavior
Failed compression should be listed, but original file should remain in folder.
Screenshots
![image](https://user-images.githubusercontent.com/104979449/167113177-023dbde3-54e1-4ce1-9cd2-c0e0df39c25f.png)
Application Log
If you can, please provide your application log. The location of the file depends on your platform, but they usually are:
[2022-05-06 12:01:29.106][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:29.107][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:29.264][I] Usage report sent successfully
[2022-05-06 12:01:31.260][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:31.261][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:33.484][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:33.484][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:36.056][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:36.056][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:36.193][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:36.193][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:39.478][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:39.479][W] QPainter::restore: Unbalanced save/restore
[2022-05-06 12:01:39.487][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/11_360x500.jpg" to "D:/Georg/Pictures/Art/tatoos/11_360x500.jpg" (:0, )
[2022-05-06 12:01:39.498][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/10_571x500.jpg" to "D:/Georg/Pictures/Art/tatoos/10_571x500.jpg" (:0, )
[2022-05-06 12:01:39.525][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/12_360x500.jpg" to "D:/Georg/Pictures/Art/tatoos/12_360x500.jpg" (:0, )
[2022-05-06 12:01:39.527][C] Failed to copy from "D:/Georg/Pictures/Art/sketches/imsedfhsrgtjg.jpg" to "D:/Georg/Pictures/Art/sketches/imsedfhsrgtjg.jpg" (:0, )
[2022-05-06 12:01:39.537][C] Failed to copy from "D:/Georg/Pictures/Art/sketches/im4g.jpg" to "D:/Georg/Pictures/Art/sketches/im4g.jpg" (:0, )
[2022-05-06 12:01:39.538][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/13_360x500.jpg" to "D:/Georg/Pictures/Art/tatoos/13_360x500.jpg" (:0, )
[2022-05-06 12:01:39.570][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/5_167x500.jpg" to "D:/Georg/Pictures/Art/tatoos/5_167x500.jpg" (:0, )
[2022-05-06 12:01:39.571][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/4_263x500.jpg" to "D:/Georg/Pictures/Art/tatoos/4_263x500.jpg" (:0, )
[2022-05-06 12:01:39.613][C] Failed to copy from "D:/Georg/Pictures/Art/tatoos/8_585x500.jpg" to "D:/Georg/Pictures/Art/tatoos/8_585x500.jpg" (:0, )
[2022-05-06 12:01:39.618][C] Failed to copy from "D:/Georg/Pictures/Art/sketches/imwg.jpg" to "D:/Georg/Pictures/Art/sketches/imwg.jpg" (:0, )
[2022-05-06 12:01:39.623][I] Compression canceled by user.
[2022-05-06 12:01:39.624][I] Compression ended successfully.
Total images: 17
Uncompressed size: "396.42 KB"
Compressed size: "394.90 KB"
Elapsed time: 179 ms
Additional context
I attached the restored original files for testing.
tatoos.zip
The text was updated successfully, but these errors were encountered: