diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..eedf27d1 Binary files /dev/null and b/.DS_Store differ diff --git a/api/TaskAgentApi.ts b/api/TaskAgentApi.ts index dae586c9..94f5baca 100644 --- a/api/TaskAgentApi.ts +++ b/api/TaskAgentApi.ts @@ -276,7 +276,9 @@ export class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITa if (splitPath.length === 0 || (splitPath.length === 1 && splitPath[0] === '')) { return null; } - if (splitPath.length === 2 && splitPath[0] === 'tfs') { + + // if the first segment of the path is tfs, the second is the collection. if the url ends in / there will be a third, empty entry + if (splitPath[0] === 'tfs' && (splitPath.length === 2 || (splitPath.length === 3 && splitPath[2].length === 0))) { //on prem accountUrl += '/' + 'tfs'; } diff --git a/package.json b/package.json index c8814ea1..43465670 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vso-node-api", "description": "Node client for Visual Studio Online/TFS REST APIs", - "version": "0.6.0", + "version": "0.6.1", "main": "./WebApi.js", "repository": { "type": "git",