Skip to content

Commit

Permalink
Allow only relative paths.
Browse files Browse the repository at this point in the history
This commit makes the following changes:
* Disallow file:/// URIs
* Allow only relative paths in the .path field of build.zig.zon
* Remote now-unneeded shlwapi dependency
  • Loading branch information
AdamGoertz committed Sep 25, 2023
1 parent 6e37e2d commit 551628a
Show file tree
Hide file tree
Showing 5 changed files with 267 additions and 261 deletions.
2 changes: 0 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ pub fn build(b: *std.Build) !void {
artifact.linkSystemLibrary("version");
artifact.linkSystemLibrary("uuid");
artifact.linkSystemLibrary("ole32");
artifact.linkSystemLibrary("shlwapi");
}
}
}
Expand Down Expand Up @@ -713,7 +712,6 @@ fn addStaticLlvmOptionsToExe(exe: *std.Build.Step.Compile) !void {
exe.linkSystemLibrary("version");
exe.linkSystemLibrary("uuid");
exe.linkSystemLibrary("ole32");
exe.linkSystemLibrary("shlwapi");
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/std/Uri.zig
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub fn parseWithoutScheme(text: []const u8) ParseError!Uri {
std.debug.assert(reader.get().? == '/');
std.debug.assert(reader.get().? == '/');

var authority = reader.readUntil(isAuthoritySeparator);
const authority = reader.readUntil(isAuthoritySeparator);
if (authority.len == 0) {
if (reader.peekPrefix("/")) break :a else return error.InvalidFormat;
}
Expand Down
1 change: 0 additions & 1 deletion lib/std/os/windows.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub const gdi32 = @import("windows/gdi32.zig");
pub const winmm = @import("windows/winmm.zig");
pub const crypt32 = @import("windows/crypt32.zig");
pub const nls = @import("windows/nls.zig");
pub const shlwapi = @import("windows/shlwapi.zig");

pub const self_process_handle = @as(HANDLE, @ptrFromInt(maxInt(usize)));

Expand Down
13 changes: 0 additions & 13 deletions lib/std/os/windows/shlwapi.zig

This file was deleted.

Loading

0 comments on commit 551628a

Please sign in to comment.