diff options
-rw-r--r-- | mbbsd/bbs.c | 8 | ||||
-rw-r--r-- | mbbsd/mail.c | 4 | ||||
-rw-r--r-- | mbbsd/record.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index d2f15454..2047b351 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1807,8 +1807,8 @@ del_range(int ent, fileheader_t *fhdr, char *direct) break; now = getindex(genbuf, rsfh.filename, size); strlcpy(currfile, rsfh.filename, sizeof(currfile)); - delete_file(genbuf, sizeof(fileheader_t), now, - cmpfilename); + delete_record(genbuf, sizeof(fileheader_t), now); + // cmpfilename); i++; } } @@ -1862,7 +1862,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct) #ifdef SAFE_ARTICLE_DELETE !safe_article_delete(ent, fhdr, direct) #else - !delete_file(direct, sizeof(fileheader_t), ent, cmpfilename) + !delete_record(direct, sizeof(fileheader_t), ent) #endif ) { int num; @@ -1883,7 +1883,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct) } /* rocker.011018: 這裡要還原被破壞的money */ fhdr->money = hdr.money; - delete_file(genbuf, sizeof(fileheader_t), num, cmpfilename); + delete_record(genbuf, sizeof(fileheader_t), num); } cancelpost(fhdr, not_owned, newpath); diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 2d21d3ad..506de43a 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -869,14 +869,14 @@ mail_del(int ent, fileheader_t * fhdr, char *direct) getdata(1, 0, msg_del_ny, genbuf, 3, LCECHO); if (genbuf[0] == 'y') { strlcpy(currfile, fhdr->filename, sizeof(currfile)); - if (!delete_file(direct, sizeof(*fhdr), ent, cmpfilename)) { + if (!delete_record(direct, sizeof(*fhdr), ent)) { setdirpath(genbuf, direct, fhdr->filename); unlink(genbuf); if ((currmode & MODE_SELECT)) { int index; sethomedir(genbuf, cuser.userid); index = getindex(genbuf, fhdr->filename, sizeof(fileheader_t)); - delete_file(genbuf, sizeof(fileheader_t), index, cmpfilename); + delete_record(genbuf, sizeof(fileheader_t), index); } return DIRCHANGED; } diff --git a/mbbsd/record.c b/mbbsd/record.c index 0216fa45..dd543f77 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -415,7 +415,6 @@ safe_article_delete_range(char *direct, int from, int to) } return 0; } -#endif int delete_file(char *dirname, int size, int ent, int (*filecheck) ()) @@ -477,6 +476,8 @@ delete_file(char *dirname, int size, int ent, int (*filecheck) ()) return -1; } +#endif + #endif /* !defined(_BBS_UTIL_C_) */ int apply_record(char *fpath, int (*fptr) (), int size){ |