소스 검색

extract: return if it fails to extract a file

Alexandre Janniaux 5 년 전
부모
커밋
2ffa4ce949
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main.rs

+ 2 - 1
src/main.rs

@@ -48,7 +48,8 @@ fn extract(input: PathBuf, output_directory: PathBuf)
 
         file_list.push(output_filename);
 
-        io::copy(&mut entry, &mut file);
+        io::copy(&mut entry, &mut file)
+            .map_err(|_| ())?;
     }
 
     Ok(file_list)