I use a custom python script to actively organize my downloads. Since moving to Big Sur, it still works 100% of the time, but about 5-10% of the time on a big download I’ll end up with multiple copies of the same file.
This is due to safari writing the file to the incoming directory, but without any indication that it is an incomplete file. (Previously it would have a .download extension, which indicates it’s incomplete).
This application is not constantly running, it is only triggered by a folder action when a file is created in the incoming directory. Previously the script would have detected the .download extension, and skips those files, allowing those to be retriggered later.
Is there a way to turn that back on? Or using python detect it is actively being downloaded?
Since the script isn’t being run continuously there isn’t a good method to compare file sizes, to see if it’s increasing. Plus, what would be the finished file size? (eg. It stopped increasing, but does that mean it’s finished? How long do we wait after it’s stopped increasing to assume it’s done?) — My gut instinct is that file sizing monitoring could be made to work, but there might be a better method to solve this.
So I’m open to any suggestions that could solve this minor pita problem.
This code was written back in python 2.2 days? I’ve been thinking about updating it to use path lib, but it works.