Skip to content

Conversation

@glacambre
Copy link
Owner

In #1683, the user reports that get_windows_env_path returns truncated
values for %AppData%, and that replacing the -3 to -2 in the value
returned by get_windows_env_path fixes this issue.
On my machine, it seems that -3 is still the correct value. This is
weird, because system()'s :help says that CRs should be stripped from
system()'s output, meaning that regardless of whether the system emits
an NL or a CRNL, the string system returns should be consistent.
We just shrug our shoulders at this mistery and start using trim()
instead of hard-coding the amount of characters to remove from
system()'s output in order to fix this.

Closes #1683

In #1683, the user reports that get_windows_env_path returns truncated
values for %AppData%, and that replacing the `-3` to `-2` in the value
returned by get_windows_env_path fixes this issue.
On my machine, it seems that `-3` is still the correct value. This is
weird, because system()'s `:help` says that CRs should be stripped from
`system()`'s output, meaning that regardless of whether the system emits
an NL or a CRNL, the string system returns should be consistent.
We just shrug our shoulders at this mistery and start using trim()
instead of hard-coding the amount of characters to remove from
system()'s output in order to fix this.

Closes #1683
@glacambre glacambre merged commit c927486 into master Jul 22, 2025
5 checks passed
@glacambre glacambre deleted the #1683 branch July 22, 2025 09:43
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.

Incorrect path for Windows via WSL

2 participants