-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Zig Version
0.11.0-dev.4404+4f6013bf5
Steps to Reproduce and Observed Behavior
Use any data.tar.gz below that contains a symbolic link.
You'll get a TarUnsupportedFileType which is explicitly returned from std.tar if it seems a symlink.
const std = @import("std");
/// USE BAD TAR.GZ HERE
const data = @embedFile("data.tar.gz");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const alloc = gpa.allocator();
var out_dir = try std.fs.cwd().openDir("test-out", .{});
var stream = std.io.fixedBufferStream(data);
var decompress = try std.compress.gzip.decompress(alloc, stream.reader());
defer decompress.deinit();
try std.tar.pipeToFileSystem(out_dir, decompress.reader(), .{
.strip_components = 1,
.mode_mode = .ignore,
});
}Expected Behavior
This should work. A lot of source archives for the Zig package manager contain symbolic links. Major source archives that I use that have symbolic links:
- libxml2
- harfbuzz
This will also impair #16643 (not block) because downloading source archives for me will be a big use case.
theoparis
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.