Use upstream zigini library

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2026-03-25 22:43:05 +01:00
parent 549576aa3e
commit a6fc5d67e8
2 changed files with 4 additions and 4 deletions

View File

@@ -5,8 +5,8 @@
.minimum_zig_version = "0.15.0",
.dependencies = .{
.zigini = .{
.url = "git+https://github.com/AnErrupTion/zigini?ref=zig-0.15.0#9281f47702b57779e831d7618e158abb8eb4d4a2",
.hash = "zigini-0.3.3-36M0FRJJAADZVq5HPm-hYKMpFFTr0OgjbEYcK2ijKZ5n",
.url = "git+https://github.com/AshAmetrine/zigini?ref=master#831f6aff55703b7fa34b43c972d60eb3d5d6f4a4",
.hash = "zigini-0.3.2-BSkB7UVDAAAErcEC6s7zF9bKTe7CjdBgrV35K3DGHpbr",
},
},
.paths = .{

View File

@@ -1860,14 +1860,14 @@ fn crawl(session: *Session, lang: Lang, path: []const u8, display_server: Displa
const entry_path = try std.fmt.allocPrint(session.label.allocator, "{s}/{s}", .{ path, item.name });
defer session.label.allocator.free(entry_path);
var entry_ini = Ini(Entry).init(session.label.allocator);
_ = try entry_ini.readFileToStruct(entry_path, .{
const data = try entry_ini.readFileToStruct(entry_path, .{
.fieldHandler = null,
.comment_characters = "#",
});
errdefer entry_ini.deinit();
const file_name = try session.label.allocator.dupe(u8, std.fs.path.stem(item.name));
const entry = entry_ini.data.@"Desktop Entry";
const entry = data.@"Desktop Entry";
var maybe_xdg_session_desktop: ?[]const u8 = null;
var maybe_xdg_desktop_names: ?[]const u8 = null;