Commit 42b66ef1 authored by Ximin Luo's avatar Ximin Luo

iso9660: better check instead of the hacky DOS/MBR thing

parent 3b6050bf
......@@ -69,7 +69,19 @@ class ISO9660Listing(Command):
class Iso9660File(File):
CONTAINER_CLASS = LibarchiveContainer
RE_FILE_TYPE = re.compile(r'\b(ISO 9660|DOS/MBR boot sector)\b')
RE_FILE_TYPE = re.compile(r'\bISO 9660\b')
def recognizes(cls, file):
if file.magic_file_type and
return True
# sometimes CDs put things like MBRs at the front, which is an expected
# part of the ISO9660 standard, but file(1)/libmagic doesn't detect this
# see for detais
with open(file.path, "rb") as fp:
return == b'CD001'
def compare_details(self, other, source=None):
differences = []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment