fix(session): probe a .dat sibling for an extensionless client-absolute path - #172
Merged
FiveTechSoft merged 1 commit intoAug 15, 2026
Conversation
…te path The RusSoft/Zerus ERP keeps every table -- ADT or DBF alike -- under a literal .dat extension, and hands the client an absolute path with no extension at all. The non-legacy client_absolute branch probed .dbf and .adt only, so those tables never resolved. Probe .dat last so a real .dbf/.adt sibling still wins; align_type_with_file() already sniffs the header, so no type is guessed here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three lines in
Connection::resolve_table_file(): in the non-legacyclient_absolutebranch, probe a
.datsibling for an extensionless path, after.dbfand.adt.Why
That branch resolves an extensionless client-absolute path by probing
.dbf, then.adt,then giving up. Legacy xBase ERPs do not follow that convention: ours keeps every table
under a literal
.datextension, ADT and DBF alike, and hands over an absolute path withno extension at all — so those tables never resolve on this path.
This is the same
ExtFileconvention the project already acknowledges: #152 ("a table keptunder a non-.adt extension works end to end"), and the comment above
align_type_with_file()in this very function, which names
.datas "what the RusSoft ERP uses for every table".This patch just extends the probe list to match what that comment already assumes.
Why it is safe
.datis probed last, so a real.dbfor.adtsibling still wins.align_type_with_file()further down sniffs the headerand has the last word, exactly as it does for every other extension.
whose tables are named
.dbf/.adtsees no change.Verification
Built MSVC 2022 x64 Release on top of
v1.8.78. Full unit suite: 1393/1393 passed,538376 assertions, 0 failures — one unrelated case excluded,
remote AdsCreateTable lands under server data dir and opens, which deadlocks in stockv1.8.78too (reportedseparately; it predates the multi-port commit and is not related to this change).