Skip to content

Commit

Permalink
Ignore permission deined errors when creating a snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
taigrr committed Mar 19, 2022
1 parent 7638e42 commit d95fc21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/snapshot/clonetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package snapshot

import (
"errors"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -149,7 +150,7 @@ func copyFileTreeInto(paths []string, destDir string, opts *CopyFileOptions) err
}
} else {
trace(" copying file: %q -> %q\n", path, destPath)
if err := copyPseudoFile(path, destPath); err != nil {
if err := copyPseudoFile(path, destPath); err != nil && !errors.Is(err, fs.ErrPermission) {
return err
}
}
Expand Down

0 comments on commit d95fc21

Please sign in to comment.