mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Entry is trying to write a file outside of the destination #677
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crystalgreen on GitHub (Mar 21, 2025).
Originally assigned to: @Copilot on GitHub.
I get the above mentioned error with this code
when running as Windows Service and the LocalSystem account. I use pkgWorkDir that is constructed starting with
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData).On my system, this returns
C:\Windows\system32\config\systemprofile\AppData\Local.The code throws the error
As one can see, there is a difference between System32 and system32.
The lib code here uses
StringComparison.Ordinalto compare the strings.My issue could be fixed, if - under Windows OS - we use
StringComparison.OrdinalIgnoreCase.