diff --git a/Tasks/DownloadBuildArtifacts/main.ts b/Tasks/DownloadBuildArtifacts/main.ts index c0a4284b3aee..4a48bd28c609 100644 --- a/Tasks/DownloadBuildArtifacts/main.ts +++ b/Tasks/DownloadBuildArtifacts/main.ts @@ -248,14 +248,15 @@ async function main(): Promise { else if (artifact.resource.type.toLowerCase() === "filepath") { let downloader = new engine.ArtifactEngine(); let downloadUrl = artifact.resource.data; - let artifactLocation = downloadUrl + '/' + artifact.name; + let artifactName = artifact.name.replace('/', '\\'); + let artifactLocation = path.join(downloadUrl, artifactName); if (!fs.existsSync(artifactLocation)) { console.log(tl.loc("ArtifactNameDirectoryNotFound", artifactLocation, downloadUrl)); artifactLocation = downloadUrl; } console.log(tl.loc("DownloadArtifacts", artifact.name, artifactLocation)); - var fileShareProvider = new providers.FilesystemProvider(artifactLocation, artifact.name); + var fileShareProvider = new providers.FilesystemProvider(artifactLocation, artifactName); var fileSystemProvider = new providers.FilesystemProvider(downloadPath); downloadPromises.push(downloader.processItems(fileShareProvider, fileSystemProvider, downloaderOptions).catch((reason) => { diff --git a/Tasks/DownloadBuildArtifacts/task.json b/Tasks/DownloadBuildArtifacts/task.json index 542be200021f..c876fce326ab 100644 --- a/Tasks/DownloadBuildArtifacts/task.json +++ b/Tasks/DownloadBuildArtifacts/task.json @@ -8,8 +8,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 134, - "Patch": 1 + "Minor": 135, + "Patch": 0 }, "groups": [ { @@ -224,4 +224,4 @@ "LatestBuildNotFound":"Latest build not found", "LatestBuildFromBranchNotFound":"Latest build from branch %s not found" } -} \ No newline at end of file +} diff --git a/Tasks/DownloadBuildArtifacts/task.loc.json b/Tasks/DownloadBuildArtifacts/task.loc.json index 91b1cb71b48e..f7aa75140acd 100644 --- a/Tasks/DownloadBuildArtifacts/task.loc.json +++ b/Tasks/DownloadBuildArtifacts/task.loc.json @@ -8,8 +8,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 134, - "Patch": 1 + "Minor": 135, + "Patch": 0 }, "groups": [ { @@ -224,4 +224,4 @@ "LatestBuildNotFound": "ms-resource:loc.messages.LatestBuildNotFound", "LatestBuildFromBranchNotFound": "ms-resource:loc.messages.LatestBuildFromBranchNotFound" } -} \ No newline at end of file +}