Skip to content

Commit

Permalink
source package upload: allow + in version
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Apr 10, 2024
1 parent 6be4f5e commit 2686121
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deb/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ func ImportPackageFiles(list *PackageList, packageFiles []string, forceReplace b
return nil, nil, err
}

filename := strings.Replace(filepath.Base(file), "%2B", "+", -1)

Check failure on line 139 in deb/import.go

View workflow job for this annotation

GitHub Actions / test

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 139 in deb/import.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofmt`-ed with `-s` (gofmt)
mainPackageFile := PackageFile{
Filename: filepath.Base(file),
Filename: filename,
Checksums: checksums,
}

Expand All @@ -152,7 +153,9 @@ func ImportPackageFiles(list *PackageList, packageFiles []string, forceReplace b

// go over all the other files
for i := range files {
sourceFile := filepath.Join(filepath.Dir(file), filepath.Base(files[i].Filename))
// convert plus to %2B, as this is how the file is stored on disk
filename := strings.Replace(filepath.Base(files[i].Filename), "+", "%2B", -1)
sourceFile := filepath.Join(filepath.Dir(file), filename)

_, err = os.Stat(sourceFile)
if err == nil {
Expand Down

0 comments on commit 2686121

Please sign in to comment.