Skip to content

Commit

Permalink
Ignore permission deined errors when creating a snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Tai Groot <tai@taigrr.com>
  • Loading branch information
taigrr committed Mar 19, 2022
1 parent b55aa0e commit e160364
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 e160364

Please sign in to comment.