summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/admin.c2
-rw-r--r--mbbsd/mail.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 2872b01b..ed3b9cec 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -1324,7 +1324,7 @@ int
cat_register(void)
{
if (system("cat register.new.tmp >> register.new") == 0 &&
- system("rm -f register.new.tmp") == 0)
+ unlink("register.new.tmp") == 0)
vmsg("OK 嚕~~ 繼續去奮鬥吧!!");
else
vmsg("沒辦法CAT過去呢 去檢查一下系統吧!!");
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 4058224b..fee66464 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1637,9 +1637,8 @@ doforward(const char *direct, const fileheader_t * fh, int mode)
char tmp_buf[128];
snprintf(fname, sizeof(fname), "/tmp/bbs.f%05d", (int)currpid);
- snprintf(tmp_buf, sizeof(tmp_buf),
- "cp %s/%s %s", direct, fh->filename, fname);
- system(tmp_buf);
+ snprintf(tmp_buf, sizeof(tmp_buf), "%s/%s", direct, fh->filename);
+ copy_file(tmp_buf, fname);
} else
return -1;