Skip to content

Commit d459a53

Browse files
authored
strip trailing slash in DEBUGINFOD_URLS (#2)
1 parent 63a3fa5 commit d459a53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/client.zig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ pub const DebuginfodContext = struct {
384384
var lastErr: anyerror = error.ErrorNotFound;
385385

386386
for (self.envs.urls) |url| {
387-
const full_url = try std.mem.concatWithSentinel(self.allocator, u8, &.{ url, url_path }, 0);
387+
const full_url = try std.mem.concatWithSentinel(self.allocator, u8, &.{ std.mem.cutSuffix(u8, url, "/") orelse url, url_path }, 0);
388388
defer self.allocator.free(full_url);
389389

390390
self.fetchAsFile(full_url, local_path) catch |err| {

0 commit comments

Comments
 (0)