Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #337: Enable use of TarArchive.RootPath for files under working directory #769

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 26, 2022

  1. Fix icsharpcode#337 (tar): Files added under CurrentDirectory must re…

    …spect RootPath
    
    This changes the behavior of TarArchive when files are added under the
    CurrentDirectory.
    
    When a TarEntry is created from a file which is under the
    CurrentDirectory, the path is made relative to the CurrentDirectory.
    This behavior affects how TarArchive removes a prefix from files set by
    the RootPath directory.
    
    The expectation for RootPath is that a matching substring will be
    removed from the prefix of entries before they are added to the
    TarArchive. Because the TarEntry for files under CurrentDirectory are
    modified, RootPath will not work if it is an absolute path under
    CurrentDirectory.
    
    This change fixes this behavior. If RootPath is a directory under
    CurrentDirectory, it will apply to entres added to TarArchive.
    
    An attempt was made to implement this change without additional string
    manipulation. This could be done with a modified IndexOf, that enables
    searching for a substring of the pattern within the target substring.
    This may improve performance.
    Chris-Johnston committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    1719e91 View commit details
    Browse the repository at this point in the history
  2. lint: sort usings

    Chris-Johnston committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    063e14b View commit details
    Browse the repository at this point in the history
  3. clean up test cases

    Chris-Johnston committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    5577f74 View commit details
    Browse the repository at this point in the history