Fix some directory issues

This commit is contained in:
Dave Halter
2020-07-02 01:17:35 +02:00
parent 227cf00638
commit e6a748b1a7
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ class ZipFileIO(file_io.KnownContentFileIO, FileIOFolderMixin):
def get_last_modified(self): def get_last_modified(self):
try: try:
return os.path.getmtime(self._zip_path) return os.path.getmtime(self._zip_path)
except (FileNotFoundError, PermissionError): except (FileNotFoundError, PermissionError, NotADirectoryError):
return None return None

View File

@@ -38,7 +38,7 @@ def _create_stub_map(directory_path_info):
def generate(): def generate():
try: try:
listed = os.listdir(directory_path_info.path) listed = os.listdir(directory_path_info.path)
except FileNotFoundError: except (FileNotFoundError, NotADirectoryError):
return return
for entry in listed: for entry in listed: