Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

chlins
Copy link
Contributor

@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.

None yet

2 participants