From c26689b82e46e2397d010e43315f6b2896d5fa03 Mon Sep 17 00:00:00 2001 From: Halo-Michael Date: Thu, 10 Jun 2021 03:27:54 +0800 Subject: [PATCH] x.x --- mount_bindfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mount_bindfs.c b/mount_bindfs.c index d765763..e2e2f50 100644 --- a/mount_bindfs.c +++ b/mount_bindfs.c @@ -46,12 +46,12 @@ int main(int argc, char **argv) { } char *dir = (char *)calloc(MAXPATHLEN, sizeof(char)); - if (realpath(argv[1], dir) == NULL) + if (realpath(argv[0], dir) == NULL) err(errno, "realpath dir %s", dir); dir = (char *)realloc(dir, (strlen(dir) + 1) * sizeof(char)); char *mountpoint = (char *)calloc(MAXPATHLEN, sizeof(char)); - if (realpath(argv[0], mountpoint) == NULL) + if (realpath(argv[1], mountpoint) == NULL) err(errno, "realpath mountpoint %s", mountpoint); mountpoint = (char *)realloc(mountpoint, (strlen(mountpoint) + 1) * sizeof(char));