mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 09:19:31 +00:00
catch errno.ENOSYS for mknod (win 10 lxsys)
mknod raises this when running as non-root under Windows 10's Linux Subsystem.
This commit is contained in:
parent
4f0c2ab68c
commit
61370082d6
1 changed files with 2 additions and 1 deletions
|
@ -311,7 +311,8 @@ def create_test_files(self):
|
|||
except PermissionError:
|
||||
have_root = False
|
||||
except OSError as e:
|
||||
if e.errno != errno.EINVAL:
|
||||
# Note: ENOSYS "Function not implemented" happens as non-root on Win 10 Linux Subsystem.
|
||||
if e.errno not in (errno.EINVAL, errno.ENOSYS):
|
||||
raise
|
||||
have_root = False
|
||||
return have_root
|
||||
|
|
Loading…
Reference in a new issue