Просмотр исходного кода

use path attribute sent back by clsi

Brian Gough 10 лет назад
Родитель
Сommit
5be1886d43

+ 1 - 3
services/web/app/coffee/Features/Compile/ClsiManager.coffee

@@ -75,10 +75,8 @@ module.exports = ClsiManager =
 	_parseOutputFiles: (project_id, rawOutputFiles = []) ->
 		outputFiles = []
 		for file in rawOutputFiles
-			path = Url.parse(file.url).path
-			path = path.replace("/project/#{project_id}/output/", "")
 			outputFiles.push
-				path: path
+				path: file.path # the clsi is now sending this to web
 				type: file.type
 				build: file.build
 		return outputFiles

+ 2 - 0
services/web/test/UnitTests/coffee/Compile/ClsiManagerTests.coffee

@@ -42,10 +42,12 @@ describe "ClsiManager", ->
 						status: @status = "success"
 						outputFiles: [{
 							url: "#{@settings.apis.clsi.url}/project/#{@project_id}/output/output.pdf"
+							path: "output.pdf"
 							type: "pdf"
 							build: 1234
 						},{
 							url: "#{@settings.apis.clsi.url}/project/#{@project_id}/output/output.log"
+							path: "output.log"
 							type: "log"
 							build: 1234
 						}]