Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

carlossanlop
Copy link
Contributor

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.

@carlossanlop carlossanlop self-assigned this Apr 4, 2023
@ghost
Copy link

ghost commented Apr 4, 2023

Tagging subscribers to this area: @dotnet/area-system-formats-tar
See info in area-owners.md if you want to be subscribed.

Issue Details

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.

Author: carlossanlop
Assignees: carlossanlop
Labels:

area-System.Formats.Tar

Milestone: -

string destinationDirectoryName = Path.Join(root.Path, "destinationDirectory");
Directory.CreateDirectory(destinationDirectoryName);

string sourceSubDirectory = Path.Join(sourceDirectoryName, subDirectory);
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@carlossanlop carlossanlop merged commit d97b17b into dotnet:main Apr 14, 2023
@carlossanlop carlossanlop deleted the TarAsyncRoundtripTests branch April 14, 2023 19:41
@carlossanlop
Copy link
Contributor Author

/backport to release/7.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/4703331570

@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants