@@ -237,11 +237,11 @@ func Diff(ctx *context.Context) {
237237 ctx .Data ["Diff" ] = diff
238238 ctx .Data ["Parents" ] = parents
239239 ctx .Data ["DiffNotAvailable" ] = diff .NumFiles () == 0
240- ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , commitID )
240+ ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , commitID )
241241 if commit .ParentCount () > 0 {
242- ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , parents [0 ])
242+ ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , parents [0 ])
243243 }
244- ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , commitID )
244+ ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , "commit" , commitID )
245245 ctx .HTML (200 , tplDiff )
246246}
247247
@@ -302,9 +302,9 @@ func CompareDiff(ctx *context.Context) {
302302 ctx .Data ["Commit" ] = commit
303303 ctx .Data ["Diff" ] = diff
304304 ctx .Data ["DiffNotAvailable" ] = diff .NumFiles () == 0
305- ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , afterCommitID )
306- ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , beforeCommitID )
307- ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , afterCommitID )
305+ ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , afterCommitID )
306+ ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , beforeCommitID )
307+ ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , "commit" , afterCommitID )
308308 ctx .Data ["RequireHighlightJS" ] = true
309309 ctx .HTML (200 , tplDiff )
310310}
0 commit comments