Skip to content

Commit

Permalink
Fixed RIFS getattrib directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-jonsson committed Jan 19, 2024
1 parent 0004c7b commit fb6b7d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/rifs/rifs_win_nix.inl
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ static bool rifs_exists(const char *path) {
}

static bool rifs_is_dir(const char *path) {
char *new_path = alloca(strlen(path) + 2);
if (!case_path(path, new_path))
return false;

struct stat s;
return !stat(path, &s) && S_ISDIR(s.st_mode);
return !stat(new_path, &s) && S_ISDIR(s.st_mode);
}

static const char *rifs_copy_root(char *dest, const char *path) {
Expand Down Expand Up @@ -238,7 +242,7 @@ static vxt_word rifs_findnext(struct dos_proc *proc, vxt_byte *data) {

invalid_filename:

VXT_LOG("WARNING: Invalid filename: %s", dire->d_name);
VXT_LOG("Invalid DOS filename: '%s'", dire->d_name);
continue;
}
}
Expand Down

0 comments on commit fb6b7d2

Please sign in to comment.