mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 06:54:40 +00:00
review fixes
This commit is contained in:
@@ -10,7 +10,7 @@ internal static class DirectoryManagement
|
||||
internal const string WriteFileOutsideDestinationMessage =
|
||||
"Entry is trying to write a file outside of the destination directory.";
|
||||
internal const string LinkTargetOutsideDestinationMessage =
|
||||
"Entry is trying to create a symbolic link outside of the destination directory.";
|
||||
"Entry is trying to create a symbolic link whose target is outside of the destination directory.";
|
||||
internal const string ReparsePointInDestinationMessage =
|
||||
"Entry is trying to extract through a symbolic link or reparse point.";
|
||||
|
||||
@@ -133,6 +133,11 @@ internal static class DirectoryManagement
|
||||
|
||||
internal static void EnsurePathIsNotReparsePoint(string path)
|
||||
{
|
||||
var destinationDirectory = Path.GetDirectoryName(path);
|
||||
if (destinationDirectory is not null)
|
||||
{
|
||||
PathExistsAndIsNotReparsePoint(destinationDirectory);
|
||||
}
|
||||
PathExistsAndIsNotReparsePoint(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user