Preserve staging I/O failure causes (T-615)

This commit is contained in:
ila
2026-07-19 20:28:56 +08:00
parent d1603c52b6
commit df6c243b21
14 changed files with 551 additions and 76 deletions
+3
View File
@@ -401,6 +401,9 @@ func TestExtractorRemovesDestinationAfterCopyFailure(t *testing.T) {
if !errors.Is(err, ErrArchiveCorrupt) {
t.Fatalf("ExtractFile() error = %v, want %v", err, ErrArchiveCorrupt)
}
if errors.Is(err, ErrStagingOutput) {
t.Fatalf("ExtractFile() error = %v, must not be a staging output failure", err)
}
if _, statErr := os.Stat(destination); !os.IsNotExist(statErr) {
t.Fatalf("copy failure left staging, stat error = %v", statErr)
}