mirror of
https://github.com/octoleo/restic.git
synced 2025-02-02 03:48:25 +00:00
archiver: Fix blocking on pipes
This commit is contained in:
parent
19b9c881ca
commit
c83c03ed63
@ -334,7 +334,7 @@ func (arch *Archiver) Save(ctx context.Context, snPath, target string, previous
|
||||
var fi os.FileInfo
|
||||
var errFI error
|
||||
|
||||
file, errOpen := arch.FS.OpenFile(target, fs.O_RDONLY|fs.O_NOFOLLOW, 0)
|
||||
file, errOpen := arch.FS.OpenFile(target, fs.O_RDONLY|fs.O_NOFOLLOW|fs.O_NONBLOCK, 0)
|
||||
if errOpen == nil {
|
||||
fi, errFI = file.Stat()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user