From 14cb00a6fc3ac310b08406363b6de54378c9c486 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Wed, 16 Jun 2021 02:00:29 +0500 Subject: [PATCH] Fix new hyphae not creating --- shroom/upload.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shroom/upload.go b/shroom/upload.go index 24a4e03..c0b0bca 100644 --- a/shroom/upload.go +++ b/shroom/upload.go @@ -64,14 +64,11 @@ func UploadBinary(h *hyphae.Hypha, mime string, file multipart.File, u *user.Use // uploadHelp is a helper function for UploadText and UploadBinary func uploadHelp(h *hyphae.Hypha, hop *history.HistoryOp, ext string, data []byte, u *user.User) (*history.HistoryOp, string) { var ( - fullPath, err = filepath.EvalSymlinks(filepath.Join(cfg.WikiGitDir, h.Name+ext)) + fullPath = filepath.Join(cfg.WikiGitDir, h.Name+ext) originalFullPath = &h.TextPath ) - if err != nil { - return hop.WithErrAbort(err), err.Error() - } if !strings.HasPrefix(fullPath, cfg.WikiGitDir) { // If the path somehow got outside the wiki dir - err = errors.New("bad path") + err := errors.New("bad path") return hop.WithErrAbort(err), err.Error() } if hop.Type == history.TypeEditBinary {