Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven committed Dec 5, 2023
1 parent 8206755 commit 4814257
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sflock/abstracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def zipjail(self, filepath, dirpath, *args):
return not return_code

def handles(self):
if self.f.filename and self.f.filename.lower().endswith(self.exts):
if self.f.filename and self.f.filename and self.f.filename.lower().endswith(self.exts):
return True

if self.f.package and self.f.package in make_list(self.package or []):
Expand Down
2 changes: 1 addition & 1 deletion sflock/unpack/zip7.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def supported(self):

def handles(self):
# MSIX shouldn't be unpacked
if hasattr(self.f, "filename") and self.f.filename.endswith(self.exts):
if hasattr(self.f, "filename") and self.f.filename and self.f.filename.endswith(self.exts):
return True
if all([pattern in self.f.contents for pattern in (b"Registry.dat", b"AppxManifest.xml")]):
return False
Expand Down

0 comments on commit 4814257

Please sign in to comment.