From ed6f6b9aac681b46d7642bf70545f2ebdd50ff92 Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Sun, 22 May 2016 17:34:58 +0200 Subject: [PATCH] platform_linux.set_flags: don't raise on EOPNOTSUPP --- borg/platform_linux.pyx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/borg/platform_linux.pyx b/borg/platform_linux.pyx index e60768aaa..55806fa89 100644 --- a/borg/platform_linux.pyx +++ b/borg/platform_linux.pyx @@ -50,9 +50,6 @@ cdef extern from "linux/fs.h": cdef extern from "stropts.h": int ioctl(int fildes, int request, ...) -cdef extern from "errno.h": - int errno - cdef extern from "string.h": char *strerror(int errnum) @@ -79,7 +76,8 @@ def set_flags(path, bsd_flags, fd=None): fd = os.open(path, os.O_RDONLY|os.O_NONBLOCK|os.O_NOFOLLOW) try: if ioctl(fd, FS_IOC_SETFLAGS, &flags) == -1: - raise OSError(errno, strerror(errno).decode(), path) + if errno.errno != errno.EOPNOTSUPP: + raise OSError(errno, strerror(errno).decode(), path) finally: if open_fd: os.close(fd)