Skip to content

Commit dd10d64

Browse files
Merge pull request #275 from skythomp16/main
Prevent tar creation from including full file path
2 parents 76e9cd2 + 0e7e48e commit dd10d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/io/tar_file_encoder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class TarFileEncoder {
8484
Future<void> addFile(File file, [String? filename]) async {
8585
final fileStream = InputFileStream(file.path);
8686
final f = ArchiveFile.stream(
87-
filename ?? file.path, file.lengthSync(), fileStream);
87+
filename ?? path.basename(file.path), file.lengthSync(), fileStream);
8888
f.lastModTime = file.lastModifiedSync().millisecondsSinceEpoch ~/ 1000;
8989
f.mode = file.statSync().mode;
9090
_encoder.add(f);

0 commit comments

Comments
 (0)