浏览代码

Fix wrong path name

Gogs 11 年之前
父节点
当前提交
fde5b16332
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/git.go

+ 1 - 1
models/git.go

@@ -163,7 +163,7 @@ func getReposFiles(userName, repoName, commitId string, rpath string) ([]*RepoFi
 				return 0
 			}
 
-			cmd := exec.Command("git", "log", "-1", "--pretty=format:%H", commitId, "--", entry.Name)
+			cmd := exec.Command("git", "log", "-1", "--pretty=format:%H", commitId, "--", path.Join(dirname, entry.Name))
 			cmd.Dir = repopath
 			out, err := cmd.Output()
 			if err != nil {