From 7d8af8cc90ac8a986c3322e3b564eb33dc2794cb Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Sun, 13 Sep 2015 20:33:41 +0100 Subject: Revert "Don't resolve broken symbolic links." I think ENOENT is fine. This reverts commit 5922a236d0ce7fcf911fce6ff7a52b11ddcf2142. --- src/bindfs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/bindfs.c') diff --git a/src/bindfs.c b/src/bindfs.c index 2593676..eb8b874 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -249,8 +249,6 @@ static int is_mirrored_user(uid_t uid) static char *process_path(const char *path, bool resolve_symlinks) { - char *res; - if (path == NULL) { /* possible? */ errno = EINVAL; return NULL; @@ -262,13 +260,10 @@ static char *process_path(const char *path, bool resolve_symlinks) if (*path == '\0') path = "."; - if (resolve_symlinks && settings.resolve_symlinks) { - res = realpath(path, NULL); - if (res) - return res; - } - - return strdup(path); + if (resolve_symlinks && settings.resolve_symlinks) + return realpath(path, NULL); + else + return strdup(path); } static int getattr_common(const char *procpath, struct stat *stbuf) -- cgit v1.2.3