Skip to content

fix: honor Output Root for single-LOG export + writable default output dir#43

Merged
oahsiao merged 1 commit into
mainfrom
fix/output-root-and-writable-default
Jul 7, 2026
Merged

fix: honor Output Root for single-LOG export + writable default output dir#43
oahsiao merged 1 commit into
mainfrom
fix/output-root-and-writable-default

Conversation

@oahsiao

@oahsiao oahsiao commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

  • Export this LOG (single-LOG export) ignored the Output Root field and always wrote to the app-level LOG_OUTPUT.
  • When installed to a protected location (e.g. C:\Program Files\M2_LOG) with Output Root empty, export/open failed with EPERM: operation not permitted, mkdir '...\LOG_OUTPUT'.

Fix

  • exportSingleLog now honors the custom Output Root when set, otherwise falls back to the default.
  • defaultOutputDir() probes writability of <install>\LOG_OUTPUT and, if not writable, falls back to Documents\M2_LOG\LOG_OUTPUT (result cached). Per-user installs under %LOCALAPPDATA% are unaffected. This also fixes the Open folder EPERM.
  • Updated the single-export button tooltip in en/zh/index.html.

Test

  • npm test — 4/4 static self-tests pass (i18n parity, JSON validity, highlight regex, no dup ids).

…e default dir

exportSingleLog now uses the custom Output Root when set (previously ignored). defaultOutputDir() probes writability and falls back to Documents\M2_LOG\LOG_OUTPUT when the install dir (e.g. Program Files) is not writable, fixing EPERM on export and open. Tooltips updated in en/zh/html.
@oahsiao oahsiao merged commit e3c5be0 into main Jul 7, 2026
5 checks passed
@oahsiao oahsiao deleted the fix/output-root-and-writable-default branch July 7, 2026 07:11
@oahsiao oahsiao mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant