Skip to content

Comments

fix: wiki delete issue#103

Closed
alicse3 wants to merge 1 commit intogogs:masterfrom
alicse3:fix-delete-wiki-issue
Closed

fix: wiki delete issue#103
alicse3 wants to merge 1 commit intogogs:masterfrom
alicse3:fix-delete-wiki-issue

Conversation

@alicse3
Copy link
Contributor

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

@alicse3 alicse3 closed this by deleting the head repository Aug 17, 2024
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