diff options
-rw-r--r-- | pseudo_client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pseudo_client.c b/pseudo_client.c index 4aa3522..116d926 100644 --- a/pseudo_client.c +++ b/pseudo_client.c @@ -1469,8 +1469,12 @@ base_path(int dirfd, const char *path, int leave_last) { if (!path) return NULL; - if (!*path) + + if (!*path) { + if (dirfd != -1 && dirfd != AT_FDCWD) + return fd_path(dirfd); return ""; + } if (path[0] != '/') { if (dirfd != -1 && dirfd != AT_FDCWD) { |