diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-19 21:01:35 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-19 21:01:35 +0800 |
commit | 116b6f11687f2d0153af1ae3e26534efea20e9fa (patch) | |
tree | e08df7af952583497c859d1e4c8543e990e223b7 /mbbsd/mail.c | |
parent | 2d526ddb51fd710a62720679cf3c861cfe3385f5 (diff) | |
download | pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar.gz pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar.bz2 pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar.lz pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar.xz pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.tar.zst pttbbs-116b6f11687f2d0153af1ae3e26534efea20e9fa.zip |
don't call system() in simple case
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2643 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r-- | mbbsd/mail.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |