diff options
author | kraxel <kraxel> | 2004-06-10 09:45:50 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2004-06-10 09:45:50 +0000 |
commit | 7a9d340846d49f5816c0b2c869ad91b144f7c5c3 (patch) | |
tree | ba90d0d7d289336b8f45976bef033cce06734963 /ls.c | |
parent | c73269a22b7fdbff11064ef0ab182a4705bf8024 (diff) | |
download | webfs-7a9d340846d49f5816c0b2c869ad91b144f7c5c3.tar.gz |
- rewrite timestamp handling: strcmp rfc1123 dates instead of attempt
to parse the date strings.
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; |