@@ -250,11 +250,11 @@ func Diff(ctx *context.Context) {
250250 ctx .Data ["Diff" ] = diff
251251 ctx .Data ["Parents" ] = parents
252252 ctx .Data ["DiffNotAvailable" ] = diff .NumFiles () == 0
253- ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , commitID )
253+ ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , commitID )
254254 if commit .ParentCount () > 0 {
255- ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , parents [0 ])
255+ ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , parents [0 ])
256256 }
257- ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , commitID )
257+ ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , "commit" , commitID )
258258 ctx .HTML (200 , tplDiff )
259259}
260260
@@ -315,9 +315,9 @@ func CompareDiff(ctx *context.Context) {
315315 ctx .Data ["Commit" ] = commit
316316 ctx .Data ["Diff" ] = diff
317317 ctx .Data ["DiffNotAvailable" ] = diff .NumFiles () == 0
318- ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , afterCommitID )
319- ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , beforeCommitID )
320- ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , afterCommitID )
318+ ctx .Data ["SourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , afterCommitID )
319+ ctx .Data ["BeforeSourcePath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "src" , "commit" , beforeCommitID )
320+ ctx .Data ["RawPath" ] = setting .AppSubURL + "/" + path .Join (userName , repoName , "raw" , "commit" , afterCommitID )
321321 ctx .Data ["RequireHighlightJS" ] = true
322322 ctx .HTML (200 , tplDiff )
323323}
0 commit comments