Skip to content

Commit

Permalink
Return appropriate files (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
horheynm authored Sep 11, 2023
1 parent 05e55e5 commit 9d9b2ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparsezoo/objects/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_file(self, file_name: str) -> Optional[File]:
for file in self.files:
if file is None:
continue
if file.name == file_name:
if file.name == os.path.basename(file_name):
return file
if isinstance(file, Directory):
file = file.get_file(file_name=file_name)
Expand Down

0 comments on commit 9d9b2ba

Please sign in to comment.