Tar long paths stored using LongName extension are not handled #99

Open
opened 2026-01-29 22:06:34 +00:00 by claunia · 0 comments
Owner

Originally created by @pawelpabich on GitHub (Jul 6, 2016).

Tar archives with long paths that are stored using LongName extension are not handled which causes files to be treated as folders.

Sample error:

at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
   at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.File.Open(String path, FileMode mode)
   at SharpCompress.Reader.IReaderExtensions.WriteEntryToFile(IReader reader, String destinationFileName, ExtractOptions options) in C:\Code\Github\sharpcompress\src\SharpCompress\Reader\IReader.Extensions.cs:line 84
   at SharpCompress.Reader.IReaderExtensions.WriteEntryToDirectory(IReader reader, String destinationDirectory, ExtractOptions options) in C:\Code\Github\sharpcompress\src\SharpCompress\Reader\IReader.Extensions.cs:line 64
   at SharpCompress.Test.TarReaderTests.Tar_LongNamesWithLongNameExtension() in C:\Code\Github\sharpcompress\test\SharpCompress.Test\Tar\TarReaderTests.cs:line 83
Result Message: Access to the path 'C:\Temp\TarOutput\wp-content\plugins\gravityformsextend\lib\Aws\Symfony\Component\ClassLoader\Tests\Fixtures\Apc\beta' is denied.```
Originally created by @pawelpabich on GitHub (Jul 6, 2016). Tar archives with long paths that are stored using LongName extension are not handled which causes files to be treated as folders. Sample error: `````` at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.File.Open(String path, FileMode mode) at SharpCompress.Reader.IReaderExtensions.WriteEntryToFile(IReader reader, String destinationFileName, ExtractOptions options) in C:\Code\Github\sharpcompress\src\SharpCompress\Reader\IReader.Extensions.cs:line 84 at SharpCompress.Reader.IReaderExtensions.WriteEntryToDirectory(IReader reader, String destinationDirectory, ExtractOptions options) in C:\Code\Github\sharpcompress\src\SharpCompress\Reader\IReader.Extensions.cs:line 64 at SharpCompress.Test.TarReaderTests.Tar_LongNamesWithLongNameExtension() in C:\Code\Github\sharpcompress\test\SharpCompress.Test\Tar\TarReaderTests.cs:line 83 Result Message: Access to the path 'C:\Temp\TarOutput\wp-content\plugins\gravityformsextend\lib\Aws\Symfony\Component\ClassLoader\Tests\Fixtures\Apc\beta' is denied.``` ``````
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#99