Skip to content

fix to stop removing instances of the artifact name that occur within the FileContainerItem path (issue: azure-pipelines-tasks#16522) #5226

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

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

Conversation

nmonizms
Copy link

@nmonizms nmonizms commented May 27, 2025

Context

For an artifact with name dist, the FileContainerProvider will strip away subdirectories that contain the artifact name in the path

For example:
dist\myapp\config.json
dist\myapp\en-us
dist\myapp\en-us\dist
dist\myapp\en-us\dist\assets
dist\myapp\en-us\dist\assets\feedback\readme.txt

The result of the copy is that it removes the nested folder called dist and we end with a file structure like below. Notice the “assets" directory is now directly under en-us instead of nested in the dist directory:

myapp\config.json
myapp\en-us
myapp\en-us\assets
myapp\en-us\assets\feedback\readme.txt

Addresses the issue reported in:
Download pipeline artifact breaks folder structure when downloading pipeline artifact, reopened #12682
Download pipeline artifact breaks folder structure when downloading pipeline artifact


Description

This code change corrects the behavior to only remove the starting directory name instead of replacing all instances of artifact name in the path.


Risk Assessment (Low / Medium / High)

Low: targeted fix to correct artifact name removal


Unit Tests Added or Updated (Yes / No)

No

Additional Testing Performed

No

@nmonizms nmonizms marked this pull request as ready for review May 28, 2025 23:10
@nmonizms nmonizms requested review from a team as code owners May 28, 2025 23:10
@nmonizms nmonizms changed the title #16522 fix to stop removing instances of the artifact name that occur… fix to stop removing instances of the artifact name that occur within the FileContainerItem path (issue: azure-pipelines-tasks#16522) Jun 2, 2025
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