mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-08 16:23:42 -04:00
platform.linux: small SyncFile error handling fix
This commit is contained in:
parent
9a64835b4d
commit
58d236c619
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue