fix: honor Output Root for single-LOG export + writable default output dir#43
Merged
Merged
Conversation
…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.
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.
Problem
Export this LOG(single-LOG export) ignored the Output Root field and always wrote to the app-levelLOG_OUTPUT.C:\Program Files\M2_LOG) with Output Root empty, export/open failed withEPERM: operation not permitted, mkdir '...\LOG_OUTPUT'.Fix
exportSingleLognow honors the custom Output Root when set, otherwise falls back to the default.defaultOutputDir()probes writability of<install>\LOG_OUTPUTand, if not writable, falls back toDocuments\M2_LOG\LOG_OUTPUT(result cached). Per-user installs under %LOCALAPPDATA% are unaffected. This also fixes theOpen folderEPERM.Test
npm test— 4/4 static self-tests pass (i18n parity, JSON validity, highlight regex, no dup ids).