chiark / gitweb /
import: support downloading .xz compressed images
[elogind.git] / src / import / import.c
index b4d859df1f408b538efaf99c8ae37ea625e59c0b..e457adf6294f640f24d49ed296011ecddf621572 100644 (file)
@@ -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);