In Attachments settings I chaged the max width and max height of thumbnails, and as expected the image thumbnails were re-created. I also use multiple directories (subdivided by year and month) to store attachments and I set a limit of 5000 files per folder. I never arrive to that value, I usually get about 200-300 attachments/month.
Today I got a mail that attachments directory is full, I checked the folders and I noticed that the current directory has 5000 files, most of them are the newly thumbnails created. I solved the problem by setting the number of files per folder to 0.
I am wondering, is this how it supposed to work? If an image attachment inserted on 05/2016 is saved into /attachments/2016/05 when re-creating the new thumbnail shouldn't be saved on the same folder instead of current folder?
I'll look at any bug except anything that has to do with attachment folders as that code is pure evil !!
O:-) don't waste too much time on this, not worth it ;)
Since that code was one of my first SMF mods (the 3rd submitted to be precise) I'm pretty sure the code could have been much better.
Then I became lazy (well, I was lazy even at that time) and I integrated it into 2.1 I think without much changes.
I'm pretty sure the code is intended to work like that in order to save some hassles to the developer.
Thank you both for the explanation ;)