diff --git a/source/filesystem.go b/source/filesystem.go index f44f003f0..cefe4a950 100644 --- a/source/filesystem.go +++ b/source/filesystem.go @@ -1,8 +1,10 @@ package source import ( + "bytes" "errors" "io" + "io/ioutil" "os" "path" "path/filepath" @@ -93,11 +95,11 @@ func (f *Filesystem) captureFiles() { if ignoreDotFile(filePath) { return nil } - file, err := os.Open(filePath) + data, err := ioutil.ReadFile(filePath) if err != nil { return err } - f.add(filePath, file) + f.add(filePath, bytes.NewBuffer(data)) return nil } }