-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Tar: Add missing TarFile.CreateFromDirectoryAsync roundtrip tests #84303
Conversation
Tagging subscribers to this area: @dotnet/area-system-formats-tar Issue DetailsSome of the paths we take for async code are separate from the sync code. Adding a couple of missing tests we added for roundtripping a tar file. Initially added in PR #84279 but decided to submit them in a separate one since the change is unrelated.
|
string destinationDirectoryName = Path.Join(root.Path, "destinationDirectory"); | ||
Directory.CreateDirectory(destinationDirectoryName); | ||
|
||
string sourceSubDirectory = Path.Join(sourceDirectoryName, subDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess Path.Join handles null values fine but I would have probably put that operation into the if block below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, let me confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join handles it properly: null is treated like empty string. The resulting path is just the first argument's path.
I would prefer to avoid restarting the CI for that, hope you don't mind.
/backport to release/7.0-staging |
Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/4703331570 |
Some of the paths we take for async code are separate from the sync code. Adding a couple of missing tests we added for roundtripping a tar file.
Initially added in PR #84279 but decided to submit them in a separate one since the change is unrelated.