mirror of
https://github.com/fairyglade/ly.git
synced 2026-05-06 07:10:36 +00:00
Use upstream zigini library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
.minimum_zig_version = "0.15.0",
|
.minimum_zig_version = "0.15.0",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.zigini = .{
|
.zigini = .{
|
||||||
.url = "git+https://github.com/AnErrupTion/zigini?ref=zig-0.15.0#9281f47702b57779e831d7618e158abb8eb4d4a2",
|
.url = "git+https://github.com/AshAmetrine/zigini?ref=master#831f6aff55703b7fa34b43c972d60eb3d5d6f4a4",
|
||||||
.hash = "zigini-0.3.3-36M0FRJJAADZVq5HPm-hYKMpFFTr0OgjbEYcK2ijKZ5n",
|
.hash = "zigini-0.3.2-BSkB7UVDAAAErcEC6s7zF9bKTe7CjdBgrV35K3DGHpbr",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|||||||
@@ -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 });
|
const entry_path = try std.fmt.allocPrint(session.label.allocator, "{s}/{s}", .{ path, item.name });
|
||||||
defer session.label.allocator.free(entry_path);
|
defer session.label.allocator.free(entry_path);
|
||||||
var entry_ini = Ini(Entry).init(session.label.allocator);
|
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,
|
.fieldHandler = null,
|
||||||
.comment_characters = "#",
|
.comment_characters = "#",
|
||||||
});
|
});
|
||||||
errdefer entry_ini.deinit();
|
errdefer entry_ini.deinit();
|
||||||
|
|
||||||
const file_name = try session.label.allocator.dupe(u8, std.fs.path.stem(item.name));
|
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_session_desktop: ?[]const u8 = null;
|
||||||
var maybe_xdg_desktop_names: ?[]const u8 = null;
|
var maybe_xdg_desktop_names: ?[]const u8 = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user