summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-19 10:22:52 -0400
committerGitHub <noreply@github.com>2021-04-19 10:22:52 -0400
commita917bae67d51c8759e65b712437af9e5fbfffd66 (patch)
treebc055fcc424827ff9db67ea1684e2b55cc4b5503 /pkg/api
parent69085570f7ebbb3768e963e2a6a31d7bb9b4ca16 (diff)
parent21827f6a0c03b19fc885b4d8a6cdd4998a75ccb9 (diff)
downloadpodman-a917bae67d51c8759e65b712437af9e5fbfffd66.tar.gz
podman-a917bae67d51c8759e65b712437af9e5fbfffd66.tar.bz2
podman-a917bae67d51c8759e65b712437af9e5fbfffd66.zip
Merge pull request #10025 from zhangguanzhang/remote-save-dir
Fixes podman-remote save to directories does not work
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/libpod/images.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index 158babcdc..92882cc40 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -270,6 +270,16 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
return
}
+ // if format is dir, server will save to an archive
+ // the client will unArchive after receive the archive file
+ // so must convert is at here
+ switch query.Format {
+ case define.OCIManifestDir:
+ query.Format = define.OCIArchive
+ case define.V2s2ManifestDir:
+ query.Format = define.V2s2Archive
+ }
+
switch query.Format {
case define.V2s2Archive, define.OCIArchive:
tmpfile, err := ioutil.TempFile("", "api.tar")