Skip to content

Commit bcf7a70

Browse files
committed
Resource.Install: fail if no root folder is found in the archive
1 parent 0c0f30e commit bcf7a70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arduino/resources/install.go

+3
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,8 @@ func findPackageRoot(parent *paths.Path) (*paths.Path, error) {
123123
return nil, fmt.Errorf("no unique root dir in archive, found '%s' and '%s'", root, file)
124124
}
125125
}
126+
if root == nil {
127+
return nil, fmt.Errorf("files in archive must be placed in a subdirectory")
128+
}
126129
return root, nil
127130
}

0 commit comments

Comments
 (0)