* fix: support delete non-urlencoded wiki page
* fix: check error
return fmt.Errorf("Unable to read HEAD tree to index in: %s %v", basePath, err)
}
- wikiPath := NameToFilename(wikiName)
- filesInIndex, err := gitRepo.LsFiles(wikiPath)
- found := false
- for _, file := range filesInIndex {
- if file == wikiPath {
- found = true
- break
- }
+ found, wikiPath, err := prepareWikiFileName(gitRepo, wikiName)
+ if err != nil {
+ return err
}
if found {
err := gitRepo.RemoveFilesFromIndex(wikiPath)