BBS: TELESC.NET.BR
Assunto: src/sbbs3/ftpsrvr.cpp
De: Rob Swindell (on Debian Linux)
Data: Thu, 21 May 2026 20:23:05 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/308b735e39c6aaefec799fd0
Modified Files:
src/sbbs3/ftpsrvr.cpp
Log Message:
ftpsrvr: remove duplicate ndx temp-file fopen() from de-dup commit
Commit 19c826410 ("add errprintf() and route LOG_ERR/LOG_CRIT through it
for de-dup") was meant only to convert the index-file fopen() failure's
lprintf(LOG_ERR,...) to errprintf(..., WHERE, ...). A rebase merge
resolution instead inserted a second, redundant fopen() of the "ndx"
temp file ahead of "success = true;" (giving the new copy the errprintf)
while leaving the original lprintf() open untouched.
That left two opens:
- the getdate (MDTM-style) path opened a temp file it never uses --
contradicting the "No temp file needed for a modification-time query"
comment -- and never set tmpfile/delfile, leaking both the descriptor
and the temp file (ironic in an EMFILE-motivated change);
- the !getdate path opened the file twice, leaking the first descriptor.
Drop the spurious block and keep the de-dup conversion on the surviving
open inside the else branch, restoring the original single-open logic.
Co-Authored-By: Claude Opus 4.7
n
---
mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net
-----------------------------------------------------------
[Voltar]