diff options
-rw-r--r-- | pttbbs/mbbsd/comments.c | 1 | ||||
-rw-r--r-- | pttbbs/mbbsd/psb.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/comments.c b/pttbbs/mbbsd/comments.c index 4b424734..ccea7514 100644 --- a/pttbbs/mbbsd/comments.c +++ b/pttbbs/mbbsd/comments.c @@ -255,6 +255,7 @@ int CommentsDeleteFromTextFile(void *ctx, int i, const char *reason) CommentsDelete(ctx, i); } else { remove(tmpfile); + return -2; } return 0; } diff --git a/pttbbs/mbbsd/psb.c b/pttbbs/mbbsd/psb.c index 1c7e2efd..26f4e271 100644 --- a/pttbbs/mbbsd/psb.c +++ b/pttbbs/mbbsd/psb.c @@ -713,7 +713,10 @@ pvcm_input_processor(int key, int curr, int total GCC_UNUSED, int rows GCC_UNUSE reason, sizeof(reason), DOECHO)) break; if (vans("確定要刪除嗎? (y/N) ") == 'y') { - CommentsDeleteFromTextFile(cx->cmctx, curr, reason); + if (CommentsDeleteFromTextFile(cx->cmctx, curr, reason) + != 0) { + vmsg("刪除失敗。可能原文已被修改。"); + } } } while(0); |