fix: catch more errors in file browser

This commit is contained in:
CJ van den Berg 2024-10-14 19:27:38 +02:00
parent 67f49110dc
commit b1362814db
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 20 additions and 18 deletions

View file

@ -28,7 +28,7 @@ pub fn name(_: *Type) []const u8 {
}
pub fn select(self: *Type) void {
if (root.is_directory(self.file_path.items) catch false) return;
if (root.is_directory(self.file_path.items)) return;
if (self.file_path.items.len > 0)
tp.self_pid().send(.{ "cmd", "save_file_as", .{self.file_path.items} }) catch {};
command.executeName("exit_mini_mode", .{}) catch {};