summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index d8f376fc..6b8d900e 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -999,18 +999,13 @@ write_file(char *fpath, int saveheader, int *islocal)
}
if (!aborted) {
- int tempfd;
if (saveheader && !(curredit & EDIT_MAIL) && check_quote())
return KEEP_EDITING;
- if (*fpath) {
- tempfd = open(fpath, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- }else{
+ if (!(*fpath))
setuserfile(fpath, "ve_XXXXXX");
- tempfd = mkstemp(fpath);
- }
- if ((fp = fdopen(tempfd, "w")) == NULL) {
+ if ((fp = fopen(fpath, "w")) == NULL) {
indigestion(5);
abort_bbs(0);
}