From b48e8425ec40fcaa237aa2cc0d3403bbbdc04bca Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Fri, 21 Apr 2017 01:13:49 +0300 Subject: [PATCH] Fix bug with file not being updated properly --- deb/import.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deb/import.go b/deb/import.go index 418f3d9a..af424056 100644 --- a/deb/import.go +++ b/deb/import.go @@ -144,9 +144,9 @@ func ImportPackageFiles(list *PackageList, packageFiles []string, forceReplace b candidateProcessedFiles = append(candidateProcessedFiles, file) // go over all the other files - for _, f := range files { - sourceFile := filepath.Join(filepath.Dir(file), filepath.Base(f.Filename)) - f.PoolPath, err = pool.Import(sourceFile, f.Filename, &f.Checksums, false, checksumStorage) + for i := range files { + sourceFile := filepath.Join(filepath.Dir(file), filepath.Base(files[i].Filename)) + files[i].PoolPath, err = pool.Import(sourceFile, files[i].Filename, &files[i].Checksums, false, checksumStorage) if err != nil { reporter.Warning("Unable to import file %s into pool: %s", sourceFile, err) failedFiles = append(failedFiles, file)