summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/file.go')
-rw-r--r--routers/api/v1/repo/file.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 0279718bbb..13a6c6c275 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -5,8 +5,9 @@
package repo
import (
+ "github.com/gogits/git-shell"
+
"github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/git"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/routers/repo"
)
@@ -20,7 +21,7 @@ func GetRawFile(ctx *middleware.Context) {
blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreeName)
if err != nil {
- if err == git.ErrNotExist {
+ if git.IsErrNotExist(err) {
ctx.Error(404)
} else {
ctx.APIError(500, "GetBlobByPath", err)