Summary
The mesavemenustructure_legacy and mesavemenustructure_v7 functions in menupack.c unconditionally update (**hm).adroutline after a successful save. The original code guarded this with !fldatabasesaveas to preserve Save As semantics (the original document's address should remain unchanged after Save As).
This guard was removed during the PR #391 refactoring. While headless mode doesn't currently support fileMenu.saveAs(), it will eventually need to work outside the migration context.
Impact
After a Save As operation, subsequent regular saves would go to the Save As destination instead of the original file, breaking expected Save As semantics.
Location
Common/source/menupack.c — mesavemenustructure_legacy() (~line 418) and mesavemenustructure_v7() (~line 462)
Fix
Restore the if (!fldatabasesaveas) guard around the (**hm).adroutline = ... update in both functions.
Priority
P1 — Not blocking current work (headless mode has no Save As yet), but must be fixed before fileMenu.saveAs() is implemented.
Source
Cursor bot review on PR #391 (comment by cursor[bot]).
Summary
The
mesavemenustructure_legacyandmesavemenustructure_v7functions inmenupack.cunconditionally update(**hm).adroutlineafter a successful save. The original code guarded this with!fldatabasesaveasto preserve Save As semantics (the original document's address should remain unchanged after Save As).This guard was removed during the PR #391 refactoring. While headless mode doesn't currently support
fileMenu.saveAs(), it will eventually need to work outside the migration context.Impact
After a Save As operation, subsequent regular saves would go to the Save As destination instead of the original file, breaking expected Save As semantics.
Location
Common/source/menupack.c—mesavemenustructure_legacy()(~line 418) andmesavemenustructure_v7()(~line 462)Fix
Restore the
if (!fldatabasesaveas)guard around the(**hm).adroutline = ...update in both functions.Priority
P1 — Not blocking current work (headless mode has no Save As yet), but must be fixed before
fileMenu.saveAs()is implemented.Source
Cursor bot review on PR #391 (comment by cursor[bot]).