Skip to content

Conversation

phw
Copy link
Member

@phw phw commented Apr 13, 2025

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

On macOS the cover art local file picker can crash. By default it seems to be allowing the selection of directories.

Solution

Ensure the cover art file picker can only select existing files, and not directories or new files, by setting FileMode.ExistingFiles.

Also I think there was no reason to limit this to the first selected file, allow adding all selected files as cover art.

phw added 2 commits April 13, 2025 12:01
Ensure the cover art file picker can only select existing files, and not
directories or new files.
@phw phw requested a review from zas April 13, 2025 10:06
@phw
Copy link
Member Author

phw commented Apr 13, 2025

Closing again. Fix is probably not fully correct. The code is currently using picard.ui.util.FileDialog, but likely shouldn't. Or if it does, this class needs to be fixed to handle all cases.

We primarily created this dialog for wrapping the case with our custom multi dir selection. I need to investigate in more detail. Also need to check the ripper log file picker, might be affected in a similar way.

As we refactored this quite heavily it behaves yet again differently in the 2.x branch, where we are using QFileDialog directly. There the above patch is likely the right approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant