summaryrefslogtreecommitdiffstats
path: root/mbbsd/admin.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-18 13:22:47 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-18 13:22:47 +0800
commitce3b6974793db3c2d95e5f4c88a45af377985a54 (patch)
treead3eac98f8b4bac11ece18c889ab1c4eb259cdab /mbbsd/admin.c
parente89db4fe4cc15f85de1da9b1b65fc87a77a0c594 (diff)
downloadpttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar.gz
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar.bz2
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar.lz
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar.xz
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.tar.zst
pttbbs-ce3b6974793db3c2d95e5f4c88a45af377985a54.zip
D: delete symlink
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1777 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r--mbbsd/admin.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 88d3f181..5abb39da 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -258,6 +258,14 @@ setup_man(boardheader_t * board)
mkdir(genbuf, 0755);
}
+void delete_symbolic_link(boardheader_t *bh, int bid)
+{
+ memset(&bh, 0, sizeof(bh));
+ substitute_record(fn_board, &bh, sizeof(bh), bid);
+ reset_board(bid);
+ log_usies("DelLink", bh->brdname);
+}
+
int
m_mod_board(char *bname)
{
@@ -337,10 +345,7 @@ m_mod_board(char *bname)
if (genbuf[0] != 'y' || !bname[0])
outs(MSG_DEL_CANCEL);
else if (bh.brdattr & BRD_SYMBOLIC) {
- memset(&bh, 0, sizeof(bh));
- substitute_record(fn_board, &bh, sizeof(bh), bid);
- reset_board(bid);
- log_usies("DelLink", bh.brdname);
+ delete_symbolic_link(&bh, bid);
}
else {
strlcpy(bname, bh.brdname, sizeof(bh.brdname));