Skip to content
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

Handle missing files when using the "Show Resulting File" button #60

Merged
merged 1 commit into from
May 8, 2024

Conversation

DavidStirling
Copy link
Member

Fixes #59

Two possible scenarios to handle here:

  • If the user had enabled the "split planes" options in raw2ometiff the "official" output file may not exist, triggering an error when pressing the "show me the resulting file" button.
  • If the user deletes the resulting file for whatever reason and then hits the button, they'd get the same exception.

To handle this we now check if the output file exists, try the parent folder if it doesn't (case 1), and abort with a cleaner error message if even that doesn't exist.

@sbesson sbesson self-requested a review May 7, 2024 10:31
@sbesson sbesson closed this May 8, 2024
@sbesson sbesson reopened this May 8, 2024
@sbesson sbesson closed this May 8, 2024
@sbesson sbesson reopened this May 8, 2024
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the two following scenarios:

  • conversion of a multi-plane file as a single file OME-TIFF followed by a deletion of the file and clicking the Show resulting file button
  • conversion of a multi-plane file as using the Split planes options followed by clicking the Show resulting file button

Confirmed that both workflows trigger an UI error with the current HEAD of NGFF-Converter. With this PR included, both workflows open the parent directory.

If I also delete the parent directory, no action seems to happen but a Unable to locate output file status message is displayed in the status bar at the bottom of the application window.

@sbesson sbesson merged commit 32b1a95 into main May 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Open Folder" button errors out if the user has deleted the resulting file
2 participants