8000 Close file input in extractArchiveToDisk · brendan-duncan/archive@76e9cd2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 76e9cd2

Browse files
Close file input in extractArchiveToDisk
1 parent a888d54 commit 76e9cd2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/src/io/extract_archive_to_disk.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ Future<void> extractFileToDisk(String inputPath, String outputPath,
105105
if (archivePath.endsWith('tar')) {
106106
final input = InputFileStream(archivePath);
107107
archive = TarDecoder().decodeBuffer(input);
108+
futures.add(input.close());
108109
} else if (archivePath.endsWith('zip')) {
109110
final input = InputFileStream(archivePath);
110111
archive = ZipDecoder().decodeBuffer(input, password: password);
112+
futures.add(input.close());
111113
} else {
112114
throw ArgumentError.value(inputPath, 'inputPath',
113115
'Must end tar.gz, tgz, tar.bz2, tbz, tar.xz, txz, tar or zip.');

0 commit comments

Comments
 (0)
0