From 556244516a31717af7865af2a2af0ab06b6efdec Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 19 Dec 2015 18:08:01 -0600 Subject: [PATCH] fmincore: treat mmap EINVAL as ENODEV (i.e. skip) As seen on OS X. Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bup/helpers.py b/lib/bup/helpers.py index ff6fe62..3c4cdb2 100644 --- a/lib/bup/helpers.py +++ b/lib/bup/helpers.py @@ -754,7 +754,7 @@ if _mincore: try: m = mmap.mmap(fd, msize, mmap.MAP_PRIVATE, 0, 0, pos) except mmap.error, ex: - if ex.errno == errno.ENODEV: + if ex.errno == errno.EINVAL or ex.errno == errno.ENODEV: # Perhaps the file was a pipe, i.e. "... | bup split ..." return None raise ex -- 2.39.2