Skip to content

Commit d0ba2c2

Browse files
committed
Expand supported VM images types
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 89d01bf commit d0ba2c2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/extractcode/archive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,9 @@ def try_to_extract(location, target_dir, extractor):
10491049
QCOWHandler = Handler(
10501050
# note that there are v1, v2 and v3 formats.
10511051
name='QEMU QCOW2 disk image',
1052-
filetypes=('qemu qcow2 image',),
1052+
filetypes=('qemu qcow2 image', 'qemu qcow image',),
10531053
mimetypes=('application/octet-stream',),
1054-
extensions=('.qcow2',),
1054+
extensions=('.qcow2', '.qcow', '.qcow2c', '.img',),
10551055
kind=file_system,
10561056
extractors=[extract_vm_image],
10571057
strict=True,

src/extractcode/vmimage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ def from_file(cls, location):
137137

138138
supported_gfs_formats_by_extension = {
139139
'.qcow2': 'qcow2',
140+
'.qcow2c': 'qcow2',
141+
'.qcow': 'qcow2',
142+
'.img': 'qcow2',
140143
'.vmdk': 'vmdk',
141144
'.vdi': 'vdi',
142145
}

0 commit comments

Comments
 (0)