summaryrefslogtreecommitdiff
path: root/fs/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'fs/errors.py')
-rw-r--r--fs/errors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/errors.py b/fs/errors.py
index 3528e2f..a683d2d 100644
--- a/fs/errors.py
+++ b/fs/errors.py
@@ -266,6 +266,10 @@ def convert_os_errors(func):
raise OperationFailedError(opname,details=e),None,tb
if e.errno == errno.ENOENT:
raise ResourceNotFoundError(path,opname=opname,details=e),None,tb
+ if e.errno == errno.EFAULT:
+ # This can happen when listdir a directory that is deleted by another thread
+ # Best to interpret it as a resource not found
+ raise ResourceNotFoundError(path,opname=opname,details=e),None,tb
if e.errno == errno.ESRCH:
raise ResourceNotFoundError(path,opname=opname,details=e),None,tb
if e.errno == errno.ENOTEMPTY: