From 58d236c61985879e86e62facb0da9fb3c85a6cf1 Mon Sep 17 00:00:00 2001 From: Carlo Teubner Date: Sat, 18 Jun 2016 13:39:22 +0100 Subject: [PATCH] platform.linux: small SyncFile error handling fix --- src/borg/platform/linux.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx index cb10253ea..4bbdcc356 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -214,7 +214,7 @@ cdef _sync_file_range(fd, offset, length, flags): assert offset & PAGE_MASK == 0, "offset %d not page-aligned" % offset assert length & PAGE_MASK == 0, "length %d not page-aligned" % length if sync_file_range(fd, offset, length, flags) != 0: - raise OSError(errno, os.strerror(errno)) + raise OSError(errno.errno, os.strerror(errno.errno)) os.posix_fadvise(fd, offset, length, os.POSIX_FADV_DONTNEED) cdef unsigned PAGE_MASK = resource.getpagesize() - 1