Skip to content

Commit

Permalink
fix alfred has no full disk access on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
konoui committed Nov 30, 2020
1 parent afe5ff9 commit bbcf8f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/bookmarker/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,11 @@ func hasReadCapability(path string) error {
return fmt.Errorf("%s does not have read permission(%s)", filepath.Base(path), perm)
}

f, err := os.Open(path)
if err != nil {
return fmt.Errorf("unable to open %s: %w", filepath.Base(path), err)
}
f.Close()

return nil
}

0 comments on commit bbcf8f8

Please sign in to comment.