From adb682bc437c99237c07d9173ec85c415e33798f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 20 May 2018 16:05:53 +0200 Subject: [PATCH] archiver: Don't open files with O_NONBLOCK This is not necessary any more, we're doing an lstat() before opening an item, so we already known it's a file and not a pipe. --- internal/archiver/archiver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index be80e0a74..0bd839b65 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -338,7 +338,7 @@ func (arch *Archiver) Save(ctx context.Context, snPath, target string, previous // reopen file and do an fstat() on the open file to check it is still // a file (and has not been exchanged for e.g. a symlink) - file, err := arch.FS.OpenFile(target, fs.O_RDONLY|fs.O_NOFOLLOW|fs.O_NONBLOCK, 0) + file, err := arch.FS.OpenFile(target, fs.O_RDONLY|fs.O_NOFOLLOW, 0) if err != nil { debug.Log("Openfile() for %v returned error: %v", target, err) err = arch.error(abstarget, fi, err)