summaryrefslogtreecommitdiff
path: root/rhimport/fetcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'rhimport/fetcher.go')
-rw-r--r--rhimport/fetcher.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go
index 1f1e84f..dd4b6df 100644
--- a/rhimport/fetcher.go
+++ b/rhimport/fetcher.go
@@ -415,5 +415,17 @@ func FetchFile(ctx *Context) (res *Result, err error) {
} else {
err = fmt.Errorf("No fetcher for uri scheme '%s' found.", uri.Scheme)
}
+
+ switch ctx.SourceFilePolicy {
+ case Keep:
+ ctx.DeleteSourceFile = false
+ ctx.DeleteSourceDir = false
+ case DeleteWithDir:
+ ctx.DeleteSourceDir = true
+ fallthrough
+ case Delete:
+ ctx.DeleteSourceFile = true
+ }
+
return
}