Skip to content

fix: add the directory info to the tar header#91

Merged
chlins merged 1 commit intomainfrom
fix/tar-header
Feb 28, 2025
Merged

fix: add the directory info to the tar header#91
chlins merged 1 commit intomainfrom
fix/tar-header

Conversation

@chlins
Copy link
Member

@chlins chlins commented Feb 27, 2025

This pull request includes several improvements to the tar and untar functionality in the archiver package, as well as some enhancements in the backend build and extract processes. The most important changes include updating the Tar and Untar functions to handle directories and file paths more robustly, and adding file type checks in the build process.

Improvements to tar and untar functionality:

  • pkg/archiver/archiver.go: Enhanced the Tar function to handle directories and preserve directory structures. Updated the Untar function to sanitize file paths and create necessary directories. [1] [2]

Backend build process enhancements:

  • pkg/backend/build/build.go: Added a check in the BuildLayer function to ensure the path is not a directory, as directories are not supported yet.

Code cleanup:

  • pkg/backend/extract.go: Removed unused imports and simplified the exportModelArtifact function by eliminating redundant directory structure restoration. [1] [2]

@chlins chlins force-pushed the fix/tar-header branch 5 times, most recently from ef04cf0 to dc0c299 Compare February 28, 2025 03:03
Signed-off-by: chlins <chlins.zhang@gmail.com>
Copy link
Contributor

@aftersnow aftersnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chlins chlins merged commit db16e4c into main Feb 28, 2025
5 checks passed
@chlins chlins deleted the fix/tar-header branch February 28, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants