Skip to content

Commit

Permalink
Hack for recognizing higan/icarus directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ghastmask committed Nov 7, 2015
1 parent 311ca60 commit 020977f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ice/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def is_valid_rom(self, path):
If no extensions are defined for this console, we just accept any file
"""

if self.extensions == "":
if self.extensions == "" and os.path.isfile(path):
return True
extension = os.path.splitext(path)[1].lower()
return any(extension == ('.' + x.strip().lower())
Expand Down
5 changes: 1 addition & 4 deletions src/ice/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ def _paths_in_directory(self, directory, incl_subdirs=False):

def files_in_directory(self, directory, include_subdirectories=False):
assert self.is_directory(directory), "Must specify a directory"
return filter(
os.path.isfile,
self._paths_in_directory(directory, incl_subdirs=include_subdirectories),
)
return self._paths_in_directory(directory, incl_subdirs=include_subdirectories)

def subdirectories_of_directory(self, directory, recursive=False):
assert self.is_directory(directory), "Must specify a directory"
Expand Down

0 comments on commit 020977f

Please sign in to comment.