mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-07 21:22:04 +00:00
Explicit Directory Inclusion in .tar File Creation #597
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SuperJMN on GitHub (Oct 27, 2023).
Hello!
I'm using your library to create .tar files (as part of the creaton of a .deb package), and I've encountered an issue regarding its structure. Based on my experience and research, it appears to be important to include directories explicitly in the file list when creating a .tar file for a .deb package.
When manually unpacking the archive using tar, the program can create the necessary directories based on the structure of the file list. However, some systems or utilities, like dpkg on Debian-based systems, are stricter regarding the package structure and require directories to be explicitly listed in the file list.
The problem I faced was that the library I'm using does not support explicitly including directories in the file list, resulting in unexpected behavior when I attempted to use the generated .tar files with dpkg.
It would be greatly appreciated if your library could add support for explicitly including directories in the file list when creating .tar files. This would help ensure compatibility with tools and systems that require this structure.
If possible, you might consider an additional option in your library that allows users to specify whether they want to include directories explicitly in the file list when creating the .tar file.
Thank you for your attention to this issue and for considering this suggestion to enhance your library's functionality.
@adamhathcock commented on GitHub (Oct 27, 2023):
A common ask. I avoided directories because I thought it was annoying!
@SuperJMN commented on GitHub (Oct 27, 2023):
Oh, I see. I understand your decision. It's useful for just a few user case. Unfortunately, it seems that it's mandatory for creating .deb files. My new project is exactly for that.
Is there any easy workaround to create the entries with the current code?
Thanks a lot.
@adamhathcock commented on GitHub (Oct 27, 2023):
The Tar implementation currently doesn't create directories so that would have to be added