-
Notifications
You must be signed in to change notification settings - Fork 19
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
thread 'main' panicked at 'called Result::unwrap()
#31
Comments
Ha! Found the error! There is a file “/Users/gralpli/.cargo/registry/cache/.DS_Store” on my system that is indeed no directory. The function Maybe you want ignore files starting with a dot throughout your program? |
Thanks for the the ticket. This is interesting, it's probably the |
Should help a bit with future cases like #31
I get
/Users/jrmuizel/.cargo/git/checkouts/panopticon-c2636b8a03012228/c738b31/examples is symlink to an non existent file |
…g their size or their contents. Apparently I falsely assumed that some paths could only contain directories or only files. cc #31
So, I added some checks to make sure files actually exist and are not dead symlinks for example before querying size. Could you please check with the git version if your crashes still occur? |
That fixes it for me. |
Awesome! |
Yes. |
Great! Thanks a lot! :D |
The problem was that I assumed the some directories would only contain files and some would only contain directories, thus simply looping over the contents of a directory and getting the filesize of every item or the contents of every subdirectory. However, this panicked when I tried to get the length of a file that was a dead symlink or if the directory I queried for its content was a regular file (as it happened with these The checks make sure that files are actually existing files and dirs are actually directories before proceeding. :) |
I‘m getting
on macOS 10.14.2.
The text was updated successfully, but these errors were encountered: