Better error handling; skip file when unarchiving

This commit is contained in:
Dane Everitt
2021-01-10 17:01:41 -08:00
parent b10e4dd437
commit e9e70b6081
3 changed files with 16 additions and 20 deletions

View File

@@ -92,8 +92,9 @@ func (fs *Filesystem) DecompressFile(dir string, file string) error {
}
p := filepath.Join(dir, name)
// If it is ignored, just don't do anything with the file and skip over it.
if err := fs.IsIgnored(p); err != nil {
return err
return nil
}
return errors.WithMessage(fs.Writefile(p, f), "could not extract file from archive")
})