FuzzyIdeas / Clop

Clipboard optimizer for macOS
https://lowtechguys.com/clop
GNU General Public License v3.0
722 stars 26 forks source link

Optimises the same file in a never-ending loop #19

Closed spiritualgeek closed 6 months ago

spiritualgeek commented 9 months ago

I have a watch folder specified that I will drop an image into and at times the image will re-optimise over and over

E.G. I'll drop the image into the folder (say 200 KB) and it will immediately pick it up and optimise to say, 40 KB

Then it will carry on in a loop until the same file is now mere bytes in size. I've just done 2 files and the one is at 204 bytes while the other at 506 bytes and both are still looping?

Today it appears to be extra bad in that it is doing with all

20240209-Edit

See video:

https://github.com/FuzzyIdeas/Clop/assets/53917562/8b7e6d50-8844-49cd-9538-889d3bfe6b79

alin23 commented 9 months ago

Hi @spiritualgeek that's odd, is this on latest version v2.5.4?

If it is, then can you run a terminal command for me and send me the output to check some things?

/usr/bin/xattr -l <drop your optimised image here>

Clop sets the clop.optimisation.status eXtended Attribute on the optimised files so that it doesn't reoptimise files in a loop like you say happens for you. Sounds like either the attribute isn't persisted on your side (maybe you're using a different filesystem than HFS or APFS?) or for some reason Clop does not have permissions to do that, or maybe there's another app erasing the xattr that Clop sets.

spiritualgeek commented 9 months ago

It's in my iCloud Documents folder but locally I, exclusively, use APFS

Can try this tomorrow if you need it

alin23 commented 9 months ago

Yes, it would be helpful if you can try this tomorrow. Maybe also capture some logs while reproducing the issue.

You can do that by searching for Clop in Console.app, or by running the following Terminal command:

log stream --level debug --style compact --process Clop --predicate 'subsystem BEGINSWITH "com.lowtechguys.Clop"' | tee ~/Desktop/clop.txt

It will create a clop.txt log file on your Desktop.