X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=blobdiff_plain;f=lib%2Fbup%2F_helpers.c;h=8085cfc4b2ea3aeb9091a409cdfd3e265571bf17;hp=c77692ab7e514e489e6f2665afba2b26336afcf0;hb=1bbf030846670d022d84b475f86d8e859ddaf903;hpb=bfc3dcae269c689f7359be2f221aca96fd821328 diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index c77692a..8085cfc 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -1137,12 +1137,12 @@ static PyObject *bup_set_linux_file_attr(PyObject *self, PyObject *args) // The extents flag can't be removed, so don't (see chattr(1) and chattr.c). orig_attr = 0; // Handle int/long mismatch (see above) rc = ioctl(fd, FS_IOC_GETFLAGS, &orig_attr); - assert(orig_attr <= UINT_MAX); // Kernel type is actually int if (rc == -1) { close(fd); return PyErr_SetFromErrnoWithFilename(PyExc_OSError, path); } + assert(orig_attr <= UINT_MAX); // Kernel type is actually int attr |= ((unsigned int) orig_attr) & FS_EXTENT_FL; rc = ioctl(fd, FS_IOC_SETFLAGS, &attr);