diff options
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -458,8 +458,8 @@ get_dir(struct REQUEST *req, char *filename) } if (this) { /* check mtime and cache entry age */ - if (this->mtime < req->bst.st_mtime || - now - this->add > MAX_CACHE_AGE) { + if (now - this->add > MAX_CACHE_AGE || + 0 != strcmp(this->mtime, req->mtime)) { free_dir(this); this = NULL; } @@ -476,10 +476,10 @@ get_dir(struct REQUEST *req, char *filename) dirs = this; DO_UNLOCK(lock_dircache); - strcpy(this->path,filename); - this->mtime = req->bst.st_mtime; - this->add = now; - this->html = ls(now,req->hostname,filename,req->path,&(this->length)); + strcpy(this->path, filename); + strcpy(this->mtime, req->mtime); + this->add = now; + this->html = ls(now,req->hostname,filename,req->path,&(this->length)); DO_LOCK(this->lock_reading); this->reading = 0; |