diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-06-29 16:40:08 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-06-29 16:40:08 +0800 |
commit | bb41b7196b3e5b62c21f21b520c88f5a5682149a (patch) | |
tree | ae2e220346d9d3c6bbfe573a87dbe952839fb6a4 | |
parent | 78e1929f6b7420992b61da12aba08b059f485826 (diff) | |
download | pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar.gz pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar.bz2 pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar.lz pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar.xz pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.tar.zst pttbbs-bb41b7196b3e5b62c21f21b520c88f5a5682149a.zip |
Alet when pvcm deletion falied.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@6020 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-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); |