diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-15 17:52:38 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-09-15 17:52:38 +0800 |
commit | e27049043bf545aabdc4fbab115712e3ce2a929d (patch) | |
tree | 424c47a5d8c4fa62669e74768b1461cf9fc31762 | |
parent | b7fd178763c0c7519c3eb7bd281cd6113fd812bf (diff) | |
download | pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.gz pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.bz2 pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.lz pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.xz pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.zst pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.zip |
fix again: touch file record.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3175 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index b7aaa703..dcf094e2 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1133,7 +1133,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct) fileheader_t postfile; boardheader_t *bp = getbcache(currbid); struct stat oldstat, newstat; - int isSysop = 0; + int isSysop = 0, recordTouched = 0; if (strcmp(bp->brdname, "Security") == 0) return DONOTHING; @@ -1198,7 +1198,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct) fhdr->textlen = newstat.st_size; else fhdr->textlen = 0; - + recordTouched = 1; } } else /* old flavor, no textlen info */ if (oldstat.st_mtime != newstat.st_mtime) @@ -1252,8 +1252,12 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct) // Ptt: here is the black hole problem // (try getindex) strcpy(fhdr->title, save_title); - substitute_ref_record(direct, fhdr, ent); + recordTouched = 1; } + + if(recordTouched) + substitute_ref_record(direct, fhdr, ent); + break; } while (1); |