Skip to content

Commit

Permalink
projectDir: only check if the file exists
Browse files Browse the repository at this point in the history
Previously, we checked if the file is a regular file, which doesn't work
when checking for directories like '.git'.
  • Loading branch information
charlievieth committed Mar 24, 2021
1 parent 957ecb2 commit a21ec0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ func projectDir(dir string) string {
for {
for _, s := range projectTombstones {
p := dir + string(filepath.Separator) + s
if fi, err := os.Lstat(p); err == nil && fi.Mode().IsRegular() {
if _, err := os.Lstat(p); err == nil {
return dir
}
}
Expand Down

0 comments on commit a21ec0f

Please sign in to comment.