summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-03 01:08:06 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-03 01:08:06 +0100
commit50aedc3c47d1f23981b3a6aed713b944b68b06db (patch)
treed8ef4e1a8588021d1efed6e770b2a6163166f393
parent0a6fa62baa6d21455485bc6669f4e5f3b6608487 (diff)
fix index file handling
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 9268577..679755d 100644
--- a/file.c
+++ b/file.c
@@ -233,8 +233,10 @@ uh_path_lookup(struct client *cl, const char *url)
continue;
strcpy(pathptr, idx->name);
- if (!stat(path_phys, &s) && (s.st_mode & S_IFREG))
+ if (!stat(path_phys, &s) && (s.st_mode & S_IFREG)) {
+ memcpy(&p.stat, &s, sizeof(p.stat));
break;
+ }
*pathptr = 0;
}