From d513362bbc8619e98695e3330a19534332382730 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Tue, 22 Apr 2025 15:24:30 -0700
Subject: [PATCH] If editor doesn't create a file, just return false from
 sbbs_t::editfile()

... don't log any error message.

This fixes issue #914
---
 src/sbbs3/writemsg.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp
index 4f93d433fa..65b0288dd0 100644
--- a/src/sbbs3/writemsg.cpp
+++ b/src/sbbs3/writemsg.cpp
@@ -1328,6 +1328,8 @@ bool sbbs_t::editfile(char *fname, uint maxlines, const char* to, const char* fr
 		rioctl(IOCM | PAUSE | ABORT);
 		if (external(cmdstr(cfg.xedit[useron_xedit - 1]->rcmd, msgtmp, nulstr, NULL, mode), mode, cfg.node_dir) != 0)
 			return false;
+		if (!fexist(msgtmp))
+			return false;
 		l = process_edited_file(msgtmp, path, /* mode: */ WM_EDIT, &lines, maxlines);
 		if (l > 0) {
 			SAFEPRINTF3(str, "created or edited file: %s (%ld bytes, %u lines)"
-- 
GitLab