FS Plugin Invalid Directory Hotfix
Resolved a segfault when an invalid directory is supplied (i.e. /e/no/ent)
@@ -174,6 +174,10 @@ func (p FSPlugin) Backup(endpoint plugin.ShieldEndpoint) error {
archive := tar.NewWriter(os.Stdout)
walker := func(path string, info os.FileInfo, err error) error {
+ if info == nil {
+ return fmt.Errorf("fs: base directory invalid")
+ }
+
if !cfg.Match(info.Name()) {
if info.IsDir() {
return filepath.SkipDir
