Skip to content

Store symlinks by default and add --follow-symlinks to toggle it#789

Merged
marcospb19 merged 15 commits intoouch-org:mainfrom
tommady:fix-773-and-775-and-293
Apr 16, 2025
Merged

Store symlinks by default and add --follow-symlinks to toggle it#789
marcospb19 merged 15 commits intoouch-org:mainfrom
tommady:fix-773-and-775-and-293

Conversation

@tommady
Copy link
Contributor

@tommady tommady commented Apr 9, 2025

Closes #773
Closes #775
Closes #293
Closes #232

…self

Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady tommady changed the title let tar on archive not follow symlink but only archive the symlink it… not follow symlink by default Apr 9, 2025
@tommady tommady changed the title not follow symlink by default not follow symlink in default Apr 9, 2025
@marcospb19
Copy link
Member

marcospb19 commented Apr 9, 2025

2 years ago I tried this at main...symlinks but couldn't make it work, so I gave up, I even started suspecting there is a problem in the tar lib itself.

@tommady
Copy link
Contributor Author

tommady commented Apr 11, 2025

2 years ago I tried this at main...symlinks but couldn't make it work, so I gave up, I even started suspecting there is a problem in the tar lib itself.

ya haha, I saw your PR already,
I wanna try again that's all ahah

but I saw you said you were facing a panic while archiving which I am not,
could you share more details about the problem you faced?

I found out in your PR you did not give the link type which is required by the append_link function.

/// You must set the entry type to either [`EntryType::Link`] or [`EntryType::Symlink`].

pleases correct me if I am wrong.

right now I am facing the unpack does not unarchive the symlink file out from the test case which I tried to add, but it can work well by the compiled binary... ahah...

thanks

image
image
image

tommady added 3 commits April 11, 2025 08:28
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady
Copy link
Contributor Author

tommady commented Apr 11, 2025

right now the tar one should be fixed, I am studying the zip one 🙇🏻

@marcospb19
Copy link
Member

ya haha, I saw your PR already,
I wanna try again that's all ahah

Oh, I'm glad you're taking a look at it! Really do appreciate the help as I couldn't figure out the solution by myself. Sorry if I worded that ambiguously.

could you share more details about the problem you faced?

I don't quite recall, but you're right, maybe I forgot to pass the correct argument.

I am studying the zip one 🙇🏻

I initially thought that Zip didn't support symlinks 🤦 looks like it does, for this PR we also need to see what's done for 7Zip.

tommady added 4 commits April 13, 2025 02:49
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady tommady marked this pull request as ready for review April 13, 2025 04:51
@tommady
Copy link
Contributor Author

tommady commented Apr 13, 2025

Hi, the zip one is fixed, and the 7z does not support symlink compression.
Please help review it while you have time.
thanks.

Copy link
Member

@marcospb19 marcospb19 left a comment

Choose a reason for hiding this comment

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

Tests are great!
Added some comments:

tommady added 5 commits April 14, 2025 07:47
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
Signed-off-by: tommady <tommady@users.noreply.github.com>
@marcospb19 marcospb19 changed the title not follow symlink in default Store symlinks by default and add --follow-symlinks to toggle it Apr 15, 2025
Copy link
Member

@marcospb19 marcospb19 left a comment

Choose a reason for hiding this comment

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

Looking great! One last thing: please add an entry to CHANGELOG.md so it appears in the release notes. :)

Signed-off-by: tommady <tommady@users.noreply.github.com>
@tommady
Copy link
Contributor Author

tommady commented Apr 16, 2025

Hi @marcospb19, I added the changelog entries. You might modify those if they do not meet the format.
Thanks.

@marcospb19 marcospb19 merged commit b9b1e11 into ouch-org:main Apr 16, 2025
15 checks passed
@marcospb19
Copy link
Member

Thanks!!

@tommady tommady deleted the fix-773-and-775-and-293 branch April 17, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants