未验证 提交 5a24757e 编写于 作者: T Tom Deseyn 提交者: GitHub

TarEntry: small fix-up. (#88118)

上级 7fc7e3cc
......@@ -333,7 +333,7 @@ internal Task ExtractRelativeToDirectoryAsync(string destinationDirectoryPath, b
string name = ArchivingUtils.SanitizeEntryFilePath(Name, preserveDriveRoot: true);
string? fileDestinationPath = GetFullDestinationPath(
destinationDirectoryPath,
Path.IsPathFullyQualified(name) ? name : Path.Join(Path.GetDirectoryName(destinationDirectoryPath), name));
Path.IsPathFullyQualified(name) ? name : Path.Join(destinationDirectoryPath, name));
if (fileDestinationPath == null)
{
throw new IOException(SR.Format(SR.TarExtractingResultsFileOutside, name, destinationDirectoryPath));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册