wwivbbs/wwiv

network3 renames "s*.net" files as pending files

Closed this issue · 3 comments

any files in the network directory matching the "s*.net" file mask gets renamed as pending files by network3, which then gets processed by network1 as a bad packet, sending it to dead.net.

this causes files in network directory which net37 docs describe as saSUB.net and srSUB.net to be junked into dead.net, causing #1517.

http://docs.wwivbbs.org/en/latest/archive/net37_docs/
see (Hosting a Netted Sub)

also described in
http://docs.wwivbbs.org/en/latest/archive/net37_tec_docs/#main_type-16-0x0010-main_type_sub_add_req

suggested fix:

diff --git a/network3/network3.cpp b/network3/network3.cpp
index a22144d33..8c0e2168f 100644
--- a/network3/network3.cpp
+++ b/network3/network3.cpp
@@ -388,7 +388,7 @@ static void rename_pending_files(const std::filesystem::path& dir) {
     rename_pend(dir, DEAD_NET, '3');
   }
 
-  FindFiles ff(FilePath(dir, "s*.net"), FindFiles::FindFilesType::files);
+  FindFiles ff(FilePath(dir, "s[0-9]*.net"), FindFiles::FindFilesType::files);
   for (const auto& f : ff) {
     rename_pend(dir, f.name, '3');
   }

Tested on Linux (Debian buster). Needs testing on win32

wwiv commented

I don't think findfiles works with regex on Win32