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: wiki delete issue #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alicse3
Copy link

@alicse3 alicse3 commented Jan 30, 2024

Fixes #7596

Describe the pull request

It seems there's an issue with the handling of special characters in wiki names, where Git internally escapes them. This creates a mismatch between the escaped filenames and the actual filenames, making it challenging to delete files accurately. As a result, the deletion process is not functioning as expected.

According to the Git documentation, when the -z option is used, filenames are not quoted, and the output is terminated with a null character (\0). For more clarification, refer to the documentation on core.quotePath as well.

This pull request addresses the issue by incorporating a conditional check for the -z option during the git ls-tree operation. It also updates the line terminator in the parseTree function accordingly.

This particular modification is not sufficient to fully resolve the issue. Another pull request will be submitted in the gogs/gogs repository to address the remaining aspects of the problem.

Delete.Wiki.Pages.mov

Link to the issue: #7596

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

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.

Cannot delete wiki page which title containing double quote symbol
1 participant