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

magic.from_file(file) generate "File Not Found" exception when file is a linux (symbolic) link #336

Open
Madpentiste opened this issue Oct 31, 2024 · 0 comments

Comments

@Madpentiste
Copy link

On a Linux/Ubuntu platform, if file is a symbolic link, magic.from_file(file) will throw a FileNotFoundError, instead of detecting that file is a link (inode/symlink).

So far, the only workaround I found is to embed the code containing the magic.from_file(file) line into a try/except block, and catch the exception.

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

No branches or pull requests

1 participant