summaryrefslogtreecommitdiff
path: root/src/import/import.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-16 18:42:17 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-16 20:09:33 +0100
commit49bb233bb734536b9617d838f09a7bf9b8336003 (patch)
tree80e4a4b7c103ea99cc5a45cc52579c53d580f005 /src/import/import.c
parent6ca5708aa969ea8ec43ee077fe70501302b8da93 (diff)
import: support downloading .xz compressed images
That way we can download fedora cloud raw images as-is and decompress them on-the-fly.
Diffstat (limited to 'src/import/import.c')
-rw-r--r--src/import/import.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/import/import.c b/src/import/import.c
index b4d859df1..e457adf62 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -79,7 +79,11 @@ static int pull_raw(int argc, char *argv[], void *userdata) {
if (local) {
const char *p;
- suffix = endswith(local, ".raw");
+ suffix = endswith(local, ".raw.xz");
+ if (!suffix)
+ suffix = endswith(local, ".raw");
+ if (!suffix)
+ suffix = endswith(local, ".xz");
if (suffix)
local = strndupa(local, suffix - local);