summaryrefslogtreecommitdiffstats
path: root/modules/packages/debian/metadata.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/packages/debian/metadata.go')
-rw-r--r--modules/packages/debian/metadata.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/packages/debian/metadata.go b/modules/packages/debian/metadata.go
index dee524c8ff..bb77f7524b 100644
--- a/modules/packages/debian/metadata.go
+++ b/modules/packages/debian/metadata.go
@@ -80,7 +80,9 @@ func ParsePackage(r io.Reader) (*Package, error) {
if strings.HasPrefix(hd.Name, controlTar) {
var inner io.Reader
- switch hd.Name[len(controlTar):] {
+ // https://man7.org/linux/man-pages/man5/deb-split.5.html#FORMAT
+ // The file names might contain a trailing slash (since dpkg 1.15.6).
+ switch strings.TrimSuffix(hd.Name[len(controlTar):], "/") {
case "":
inner = arr
case ".gz":