magic.from_file(file) generate "File Not Found" exception when file is a linux (symbolic) link
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 304
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the magic.from_file(file) behavior on Linux/Ubuntu with a symbolic link. Trace the magic.from_file entry point and determine how symlink paths are handled; done means the reported link case no longer raises FileNotFoundError and has a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100