Wrong output after error with temporary file.

Started by Jan2, December 21, 2022, 12:48:25 PM

Previous topic - Next topic


This was the output:

Error: Temporary file already exists: /file1.jpg_exiftool_tmp
- 0 image files updated
- 1 files weren't updated due to errors

But the result was a file that WAS in fact correctly updated (i.e. added a location)!

- I have seen this twice so far. The first time I thought I must be wrong somehow. But after the second time I am sure, because this time I saved the output including that error, and compared the before and after files again.
- The first time was on macOS Catalina 10.14, second on Ventura 13.1.
- Both times ExifTool 12.50 was used.
- It was NOT the same file in both cases.

- In these tests I always used a fresh copy of a media folder and ran it using a simple arg-file using stay_open. (I think I copied the files to a RAM disc both of these times, but I am not completely sure the first time.)


Phil Harvey

Afterwards, does the _exiftool_tmp file exist?  If not, the only thing I can think of is that there was another exiftool process editing the file at the same time.  But if it does exist, then an exiftool process got killed somehow before it was finished editing the file.  In this case you will need to delete the _exiftool_tmp file yourself.

Since you say the file was updated, I'm guessing it was updated by another process because if you get this error message the file will not be updated.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


I was not specifically looking for remaining temporary files at that time. But I retrieved the affected image using my default Finder list view, so I guess I would have noticed.

I have "theoretical" (i.e. completely untested for now) code, that checks if the task is still running, and restarts ExifTool otherwise. But this only runs once per image and definitely clears the arg file on restart ... I will add more logging there to see if restarts are happening at all during my tests.