Skip to content

Commit

Permalink
Move tag retrieval into if
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossanlop committed Jul 18, 2023
1 parent ddd8c8f commit 53e2ad8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ private TarEntry ConstructEntryForWriting(string fullPath, string entryName, Fil

bool isDirectory = (attributes & FileAttributes.Directory) != 0;

Interop.Kernel32.WIN32_FIND_DATA data = default;
Interop.Kernel32.GetFindData(fullPath, isDirectory, ignoreAccessDenied: false, ref data);

TarEntryType entryType;
if ((attributes & FileAttributes.ReparsePoint) != 0)
{
Interop.Kernel32.WIN32_FIND_DATA data = default;
Interop.Kernel32.GetFindData(fullPath, isDirectory, ignoreAccessDenied: false, ref data);

if (data.dwReserved0 is Interop.Kernel32.IOReparseOptions.IO_REPARSE_TAG_SYMLINK or
Interop.Kernel32.IOReparseOptions.IO_REPARSE_TAG_MOUNT_POINT)
{
Expand Down

0 comments on commit 53e2ad8

Please sign in to comment.