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.
This commit is contained in:
Alexander Neumann 2018-05-20 16:05:53 +02:00
parent 1e9744c9a4
commit adb682bc43

View file

@ -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)