summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-06-01 13:53:56 +0700
committerShulhan <ms@kilabit.info>2023-06-01 13:53:56 +0700
commit118b5e74adcd0079574e815b576aca87f1bc5d03 (patch)
tree70403d544cffd2d139b2b6f42adec9a7ce40f441
parentbdc97d6b2be0a8bfa0275cb4333a8b72b10dfde3 (diff)
downloadciigo-118b5e74adcd0079574e815b576aca87f1bc5d03.tar.xz
all: ignore error permission when listing file markups
Instead of returning the error, ignore it and continue processing other files in the list.
-rw-r--r--ciigo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ciigo.go b/ciigo.go
index 2978390..d782a88 100644
--- a/ciigo.go
+++ b/ciigo.go
@@ -277,6 +277,9 @@ func listFileMarkups(dir string, excRE []*regexp.Regexp) (
d, err = os.Open(dir)
if err != nil {
+ if os.IsPermission(err) {
+ return nil, nil
+ }
return nil, fmt.Errorf(`%s: %w`, logp, err)
}