summaryrefslogtreecommitdiff
path: root/rhimport/importer.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-12 18:28:32 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-12 18:28:32 (GMT)
commite78b3cc629ff230ddb3479a036c1858a76ee7f5a (patch)
treed8f2de86aca1aae1eaf8b7be22773f9ac09921de /rhimport/importer.go
parent453d7f9e7311b28802b194640792e2689073590c (diff)
returning next sourceuri when filepolicy = keep
Diffstat (limited to 'rhimport/importer.go')
-rw-r--r--rhimport/importer.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/rhimport/importer.go b/rhimport/importer.go
index c840bae..952f75a 100644
--- a/rhimport/importer.go
+++ b/rhimport/importer.go
@@ -32,6 +32,7 @@ import (
"net/http"
"os"
"path"
+ "strings"
"github.com/andelf/go-curl"
)
@@ -425,7 +426,11 @@ func cleanupFiles(ctx *Context, res *Result) {
}
}
} else {
- res.SourceFile = ctx.SourceFile
+ if strings.HasPrefix(ctx.SourceFile, ctx.conf.LocalFetchDir) {
+ res.SourceFile = "local://" + strings.TrimPrefix(ctx.SourceFile, ctx.conf.LocalFetchDir)
+ } else if strings.HasPrefix(ctx.SourceFile, ctx.conf.TempDir) {
+ res.SourceFile = "tmp://" + strings.TrimPrefix(ctx.SourceFile, ctx.conf.TempDir)
+ }
}
return
}