summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 20:35:23 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 20:35:23 +0800
commit2eada8f40b4296e612182b55907fecf4dcaaf9fe (patch)
tree46577135a4d687515d8d2964456e097ad8676fb3
parentd08db5565702465469052e01d06ff76194d03cd4 (diff)
downloadpttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar.gz
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar.bz2
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar.lz
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar.xz
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.tar.zst
pttbbs-2eada8f40b4296e612182b55907fecf4dcaaf9fe.zip
only check if the file exists when marking. (not unmarking)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1759 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index f1e09eaf..7d9b75d9 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1737,7 +1737,8 @@ mark_post(int ent, fileheader_t * fhdr, char *direct)
setbpath(fpath, currboard);
sprintf(buf, "%s/%s", fpath, fhdr->filename);
- if(access(buf, F_OK) < 0)
+ if( !(fhdr->filemode & FILE_MARKED) && /* 若目前還沒有 mark 才要 check */
+ access(buf, F_OK) < 0 )
return DONOTHING;
fhdr->filemode ^= FILE_MARKED;