mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
panic when empty string passed as dest_rel_path to addInstallFileWithDir
causes the creation of a file instead of the directory that's meant to be created
This commit is contained in:
parent
26793453a7
commit
f51ccf0d1f
@ -907,6 +907,9 @@ pub const Builder = struct {
|
||||
install_dir: InstallDir,
|
||||
dest_rel_path: []const u8,
|
||||
) *InstallFileStep {
|
||||
if (dest_rel_path.len == 0) {
|
||||
panic("dest_rel_path must be non-empty", .{});
|
||||
}
|
||||
const install_step = self.allocator.create(InstallFileStep) catch unreachable;
|
||||
install_step.* = InstallFileStep.init(self, src_path, install_dir, dest_rel_path);
|
||||
return install_step;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user