Revert File Open to catch File Access Errors.

https://github.com/ZeroNetX/ZeroNet/issues/174
This commit is contained in:
canewsin 2022-05-27 08:38:20 +05:30
parent b257338b0a
commit c3815c56ea
1 changed files with 1 additions and 5 deletions

View File

@ -255,11 +255,7 @@ class SiteStorage(object):
if create_dirs:
file_inner_dir = os.path.dirname(inner_path)
self.ensureDir(file_inner_dir)
try :
return open(file_path, mode, **kwargs)
except IOError as err:
self.log.error("File Access error: %s" % Debug.formatException(err))
return None
return open(file_path, mode, **kwargs)
# Open file object
@thread_pool_fs_read.wrap