Skip to content
Snippets Groups Projects
Commit df547c79 authored by Seblu's avatar Seblu
Browse files

fix bad detection of destination file type during extraction

this cause block device to be detected as an invalid destination during payload extraction
parent ba3927aa
No related branches found
No related tags found
No related merge requests found
......@@ -662,8 +662,8 @@ class Payload(object):
dest = os.path.join(dest, self.name)
# check validity of dest
if os.path.exists(dest):
if not os.path.isfile(dest):
raise Exception("Destination %s is not a file" % dest)
if os.path.isdir(dest):
raise Exception("Destination %s is a directory" % dest)
if not force:
raise Exception("File %s already exists" % dest)
# opening destination
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment