Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repository: don't crash accessing invalid pathinfo (#443)
When fs.Stat returns an error, pathinfo may be nil. In such situations the only safe response seems to be to return the error to the caller. Without this fix, accessing pathinfo.IsDir() below would lead to a crash dereferencing a nil pointer. This crash can be reproduced by trying to initialize a Git repo with an invalid path name. Also see: muesli/gitty#36
- Loading branch information