Skip to content

Commit 1cc26fc

Browse files
committed
Allow only relative paths.
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
1 parent 4f54f44 commit 1cc26fc

File tree

5 files changed

+267
-261
lines changed

5 files changed

+267
-261
lines changed

build.zig

-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ pub fn build(b: *std.Build) !void {
336336
artifact.linkSystemLibrary("version");
337337
artifact.linkSystemLibrary("uuid");
338338
artifact.linkSystemLibrary("ole32");
339-
artifact.linkSystemLibrary("shlwapi");
340339
}
341340
}
342341
}
@@ -713,7 +712,6 @@ fn addStaticLlvmOptionsToExe(exe: *std.Build.Step.Compile) !void {
713712
exe.linkSystemLibrary("version");
714713
exe.linkSystemLibrary("uuid");
715714
exe.linkSystemLibrary("ole32");
716-
exe.linkSystemLibrary("shlwapi");
717715
}
718716
}
719717

lib/std/Uri.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub fn parseWithoutScheme(text: []const u8) ParseError!Uri {
150150
std.debug.assert(reader.get().? == '/');
151151
std.debug.assert(reader.get().? == '/');
152152

153-
var authority = reader.readUntil(isAuthoritySeparator);
153+
const authority = reader.readUntil(isAuthoritySeparator);
154154
if (authority.len == 0) {
155155
if (reader.peekPrefix("/")) break :a else return error.InvalidFormat;
156156
}

lib/std/os/windows.zig

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub const gdi32 = @import("windows/gdi32.zig");
3030
pub const winmm = @import("windows/winmm.zig");
3131
pub const crypt32 = @import("windows/crypt32.zig");
3232
pub const nls = @import("windows/nls.zig");
33-
pub const shlwapi = @import("windows/shlwapi.zig");
3433

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

lib/std/os/windows/shlwapi.zig

-13
This file was deleted.

0 commit comments

Comments
 (0)