X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fimport%2Fimport.c;h=b3ebb353570fa09608878ff84e5859171c290037;hp=0c215c64846d56e677aff6bacf17125e722230b6;hb=8af3cf74df03f7528f9e2605ec7896a5daf0f711;hpb=ccf23ad5faf228d450d263d7291156a948b61af2 diff --git a/src/import/import.c b/src/import/import.c index 0c215c648..b3ebb3535 100644 --- a/src/import/import.c +++ b/src/import/import.c @@ -51,10 +51,12 @@ static int strip_tar_suffixes(const char *name, char **ret) { char *s; e = endswith(name, ".tar"); + if (!e) + e = endswith(name, ".tar.xz"); if (!e) e = endswith(name, ".tar.gz"); if (!e) - e = endswith(name, ".tar.xz"); + e = endswith(name, ".tar.bz2"); if (!e) e = endswith(name, ".tgz"); if (!e) @@ -162,6 +164,7 @@ static int strip_raw_suffixes(const char *p, char **ret) { static const char suffixes[] = ".xz\0" ".gz\0" + ".bz2\0" ".raw\0" ".qcow2\0" ".img\0"