Skip to content

Commit

Permalink
fix dirfd
Browse files Browse the repository at this point in the history
  • Loading branch information
KoyamaSohei committed Oct 6, 2024
1 parent a37719f commit a16be4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/libfinchrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ hook_mkdirat(long a1, long a2, long a3, long a4, long a5, long a6, long a7)
char *path = (char *)a3;
mode_t mode = (mode_t)a4;
int ret;
if (dirfd == AT_FDCWD && strncmp(path, prefix, prefix_len) == 0) {
if (strncmp(path, prefix, prefix_len) == 0) {
path += prefix_len;
ret = finchfs_mkdir(path, mode);
return ret < 0 ? -errno : ret;
Expand Down Expand Up @@ -824,7 +824,7 @@ hook_newfstatat(long a1, long a2, long a3, long a4, long a5, long a6, long a7)
struct stat *st = (struct stat *)a4;
int flags = (int)a5;
int ret;
if (dirfd == AT_FDCWD && strncmp(pathname, prefix, prefix_len) == 0) {
if (strncmp(pathname, prefix, prefix_len) == 0) {
pathname += prefix_len;
ret = finchfs_stat(pathname, st);
return ret < 0 ? -errno : ret;
Expand Down

0 comments on commit a16be4e

Please sign in to comment.