Skip to content

Commit 439078e

Browse files
committed
fix: Update TFS URI handling in TfsEmbededImagesTool.cs
Modified the condition for validating `matchedSourceUri` to check if its `PathAndQuery` starts with "/tfs" instead of looking for "tfs/DefaultCollection". This change enhances the flexibility of URI processing for TFS.
1 parent 0e42413 commit 439078e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsEmbededImagesTool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private string UploadedAndRetrieveAttachmentLinkUrl(string matchedSourceUri, str
132132
{
133133
if (!string.IsNullOrEmpty(sourcePersonalAccessToken))
134134
{
135-
if (!string.IsNullOrEmpty(sourcePersonalAccessToken) && matchedSourceUri.Contains("tfs/DefaultCollection"))
135+
if (!string.IsNullOrEmpty(sourcePersonalAccessToken) && new Uri(matchedSourceUri).PathAndQuery.StartsWith("/tfs/"))
136136
{
137137
string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Format("{0}:{1}", "", sourcePersonalAccessToken)));
138138
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);

0 commit comments

Comments
 (0)