-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bug: Check for errors when importing files #18
Comments
Now I remember why I originally did not allow clean with import only. Had some issues with the exit status of exiftool. Need to investigate and do some testing. |
So here is the issue: I need the ability to re-import and re-process files, sometimes all, sometimes sparse - e.g. just the missing files. When an output file already exists, exiftool throws an error and moves to the next files. These are acceptable errors as the default behavior of goprox is based on skipping existing files. However it means the error status of exiftool is no longer 0. Other errors obviously need to get caught. Need to see if I can tell exiftool that existing target files errors are to be ignored while others are not. |
I think it would still be dangerous to clean files if some existing files were skipped. Imagine an import is stopped in the middle for whatever reason (power outage, disconnected drive…), one of the file may be existing but incomplete. If the user does not pay attention and blindly runs the command again, a file will be lost. It would not seem a problem to me if cleanup were allowed only when exiftool return no error. If exiftool fails because of existing files, it would be the responsibility of the user to solve the problem (use archive and cleanup, manually cleanup, or remove existing files and run the command again). What do you think? |
That is indeed a potentially simple solution. Also still looking at some exiftool options. Will get back asap. |
FYI This is why I personally always make archives that I store separately, even at the cost of a lot of extra storage, because it is the one guarantee I have to be able to re-run from scratch. Especially since developing But this issue needs to be addressed no matter what. |
New exiftool error handling and error code capture. Most exiftools errors are summarized as warnings to the user. In the case of an exiftool error prior to a clean task, the process gets aborted with an exiftool error message
@Giga Pushed the initial error handling logic as discussed. Can you test before I cut this into a new release? Thanks! Example output when encountering one or more exiftool errors:
|
Hello, Many thanks for the reactivity. I have this error with latest version: _clean_media:[:8: ']' expected |
Could you please open a new issue and share more details? Would be great if you could run your command with --debug and copy the output there. Thanks! |
Exit status of exiftool in _import_media function is not checked. This is dangerous especially since cleanup can now be used with import.
The text was updated successfully, but these errors were encountered: