Skip to content

Commit

Permalink
libkeymap: fix double kbdfile open
Browse files Browse the repository at this point in the history
976867c (Rewrite libkbdfile library) changed kbdfile_find to error
when the file descriptor was already opened. Make sure kbdfile_find
isn't called again when kbdfile is found in include_dirpath1.

Signed-off-by: Sertonix <[email protected]>
  • Loading branch information
sertonix authored and legionus committed May 20, 2024
1 parent f3faba1 commit 75adb54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libkeymap/analyze.l
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ find_standard_incl_file(struct lk_ctx *ctx, char *s, struct kbdfile *fp)
i--;
pathname = kbdfile_get_pathname(ctx->stack[i]);

if (kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
if (rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp)) {
if ((rc = find_incl_file_near_fn(ctx, s, pathname, fp)) == -1)
return rc;
}
Expand Down

0 comments on commit 75adb54

Please sign in to comment.