1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 09:19:31 +00:00

Merge pull request #1266 from ThomasWaldmann/fix-chown-cygwin

catch "invalid argument" on cygwin, fixes #257
This commit is contained in:
TW 2016-07-05 17:33:56 +02:00 committed by GitHub
commit 7987434a3f

View file

@ -288,10 +288,14 @@ def create_test_files(self):
# File mode
os.chmod('input/dir2', 0o555) # if we take away write perms, we need root to remove contents
# File owner
os.chown('input/file1', 100, 200)
os.chown('input/file1', 100, 200) # raises OSError invalid argument on cygwin
have_root = True # we have (fake)root
except PermissionError:
have_root = False
except OSError as e:
if e.errno != errno.EINVAL:
raise
have_root = False
return have_root
def test_basic_functionality(self):