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

cocoa: fix default icon search when standalone app is not an .app bundle #2852

Merged
merged 2 commits into from
Sep 17, 2024

Commits on Sep 16, 2024

  1. cocoa: fix default icon search when standalone app is not an .app bundle

    When trying to obtain the default application icon in macOS standalone
    application by querying `CFBundleIconFile` key, account for possibility
    that application is not built as an .app bundle. I.e., ensure that the
    returned string is not `None` before trying to construct `pathlib.Path`
    with it. If returned string is `None`, raise `FileNotFoundError`, which
    is handled by the calling layer.
    
    This fixes `TypeError: argument should be a str or an os.PathLike object
    where __fspath__ returns a str, not 'NoneType'` error when application
    has no icon set and PyInstaller is used to build a POSIX executable
    (as opposed to an .app bundle).
    rokm committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    75b1dd2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d65a461 View commit details
    Browse the repository at this point in the history