add missing file exists check
authorFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 09:10:03 +0000 (10:10 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 09:10:09 +0000 (10:10 +0100)
file.c

diff --git a/file.c b/file.c
index 5de96f8250245c5c297c41cce9183da535996889..a6350eb3607a46c1d9143a0c655e5a74a4839fd4 100644 (file)
--- a/file.c
+++ b/file.c
@@ -176,6 +176,9 @@ uh_path_lookup(struct client *cl, const char *url)
                exists = !!canonpath(uh_buf, path_phys);
                uh_buf[i] = ch;
 
+               if (!exists)
+                       continue;
+
                snprintf(path_info, sizeof(path_info), "%s", uh_buf + i);
                break;
        }