mirror of
https://github.com/restic/restic.git
synced 2025-08-12 17:07:40 +00:00
Return error when reading zero byte from stdin
This commit changes the internal file system implementation for reading data from stdin, it now returns an error when no bytes could be read. I think it's worth failing in this case, the user instructed restic to read some data from stdin, and no data was read at all. Maybe it was in a pipe and some earlier stage failed. See #2135 for a short discussion.
This commit is contained in:
@@ -160,7 +160,6 @@ func TestArchiverSaveFileReaderFS(t *testing.T) {
|
||||
var tests = []struct {
|
||||
Data string
|
||||
}{
|
||||
{Data: ""},
|
||||
{Data: "foo"},
|
||||
{Data: string(restictest.Random(23, 12*1024*1024+1287898))},
|
||||
}
|
||||
@@ -271,7 +270,6 @@ func TestArchiverSaveReaderFS(t *testing.T) {
|
||||
var tests = []struct {
|
||||
Data string
|
||||
}{
|
||||
{Data: ""},
|
||||
{Data: "foo"},
|
||||
{Data: string(restictest.Random(23, 12*1024*1024+1287898))},
|
||||
}
|
||||
|
Reference in New Issue
Block a user