Skip to content

Conversation

@pixelcmtd
Copy link
Member

@pixelcmtd pixelcmtd commented Jan 5, 2022

What does it do?

I added two new #defines called TLDR_ZIP_DIR and TLDR_ZIP_DIR_LEN, used them in update_localdb and changed TLDR_DIR back.

Why the change?

While the directory in the ZIP has this different name, we assume the name of the extracted directory, for example in TLDR_EXT, to be tldr. This is what caused the segfaults.

How can this be tested?

Try reproducing #71 or #74.

@pixelcmtd pixelcmtd marked this pull request as ready for review January 5, 2022 22:54
@pixelcmtd pixelcmtd changed the title Fixed segfaults Fixed wrong cache directory name Jan 5, 2022
Copy link
Contributor

@MasterOdin MasterOdin left a comment

Choose a reason for hiding this comment

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

Merging this onto the CI changes in #76 verified that this fixes the segfault on macos and linux: https://github.com/tldr-pages/tldr-c-client/runs/4727718920?check_suite_focus=true

Per the review comment #59 (comment), this seems like it fixes the problem in the best way, that we now properly extract the zip into the ~/.tdr directory.

Copy link
Member

@owenvoke owenvoke left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions
Copy link

Hi all! This thread has not had any recent activity.
Are there any updates? Thanks!

@MasterOdin MasterOdin merged commit 6d20744 into tldr-pages:master Jan 22, 2022
@pixelcmtd pixelcmtd deleted the patch-2 branch January 22, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants