mirror of https://github.com/fairyglade/ly.git
small cleanup
This commit is contained in:
parent
b66e7f09d2
commit
220fbf79b0
|
@ -274,7 +274,6 @@ fn loginConv(
|
||||||
|
|
||||||
fn resetTerminal(shell: [*:0]const u8, term_reset_cmd: [:0]const u8) !void {
|
fn resetTerminal(shell: [*:0]const u8, term_reset_cmd: [:0]const u8) !void {
|
||||||
const pid = try std.os.fork();
|
const pid = try std.os.fork();
|
||||||
|
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
_ = interop.execl(shell, shell, "-c", term_reset_cmd.ptr, @as([*c]const u8, 0));
|
_ = interop.execl(shell, shell, "-c", term_reset_cmd.ptr, @as([*c]const u8, 0));
|
||||||
std.os.exit(0);
|
std.os.exit(0);
|
||||||
|
|
|
@ -5,7 +5,7 @@ const Save = @import("Save.zig");
|
||||||
pub fn tryMigrateSaveFile(user_buf: *[32]u8, old_path: []const u8, new_path: []const u8) Save {
|
pub fn tryMigrateSaveFile(user_buf: *[32]u8, old_path: []const u8, new_path: []const u8) Save {
|
||||||
var save = Save{};
|
var save = Save{};
|
||||||
|
|
||||||
var file = std.fs.openFileAbsolute(old_path, .{ .mode = .read_only }) catch return save;
|
var file = std.fs.openFileAbsolute(old_path, .{}) catch return save;
|
||||||
defer file.close();
|
defer file.close();
|
||||||
|
|
||||||
const reader = file.reader();
|
const reader = file.reader();
|
||||||
|
|
Loading…
Reference in New Issue