bug fix so that RCv2 Linux can download script file within a folder inside a container#71
Merged
Merged
Conversation
birukyitbarek
approved these changes
Jan 26, 2026
viveklingaiah
approved these changes
Jan 27, 2026
jscalev
approved these changes
Jan 27, 2026
Add error handling for empty trimmed path in URL
Removed redundant check for empty splitStrings before extracting fileName.
Added prerequisites for running Test_GetSASBlob_nestedDirectories_actualBlob.
jscalev
approved these changes
Jan 30, 2026
Merged
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:
Previously, RCv2 Linux wouldn't download the script file from a Storage Account if the script was in a folder inside a container. os.OpenFile(), which RCv2 linux used to create the local file for the script, does not support the creation of additional/nested directories. So a file like "dir1/file.txt" would fail to create and open.
Solution:
Instead of trying to re-create the nested directory structure of a file, we only create the file itself. For example, if targetDir is the name of the directory where we are downloading our scripts locally, and a file is stored in the container as, say, "containerName/dir1/file.txt", our final local file will not be "targetDir/dir1/file.txt", but rather targetDir/file.txt". This is the same if the file in the container was at "containerName/dir1/dir2/foo.sh". It would end up locally at targetDir/foo.sh"
Related issues/links:
https://dev.azure.com/msazure/One/_workitems/edit/30049776/
#9
https://portal.microsofticm.com/imp/v5/incidents/details/559372230/summary