mcandre / toys

code demos for newbies
https://github.com/mcandre/toys
30 stars 6 forks source link

panic on file paths that should be directories #355

Open mcandre opened 1 year ago

mcandre commented 1 year ago

Provide the user with more direct error messages, in the event that an expected path that is supposed to be a directory, turns out to be a non-directory file.

It can happen, and unfortunately it's a subtle thing that will confused a lot of users, both new and seasoned. The user deserves a more useful error message than dumb ol' "ENOENT."