Update zigini (fixes incorrect comment parsing)

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion
2024-07-30 09:43:56 +02:00
parent 48185bdfe0
commit 5f2f21620a
4 changed files with 25 additions and 12 deletions

View File

@@ -1,7 +1,19 @@
// The migrator ensures compatibility with <=0.6.0 configuration files
const std = @import("std");
const ini = @import("zigini");
const Save = @import("Save.zig");
pub fn configFieldHandler(_: std.mem.Allocator, field: ini.IniField) ?ini.IniField {
var mapped_field = field;
if (std.mem.eql(u8, field.key, "blank_password")) {
mapped_field.key = "clear_password";
}
return mapped_field;
}
pub fn tryMigrateSaveFile(user_buf: *[32]u8, path: []const u8) Save {
var save = Save{};