Skip to content

Commit

Permalink
prevent crash on AccessDenied on toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jul 28, 2024
1 parent 463e94f commit 811e444
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/utils.zig
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ pub fn toggleItemChildren(item: *Item) !bool {
}

_ = item.children() catch |e| {
// TODO: show user
switch (e) {
ItemError.IsNotDirectory => return false,
error.AccessDenied => return false,
else => return e,
}
};
Expand Down

0 comments on commit 811e444

Please sign in to comment.