Skip to content

Commit

Permalink
Applying same fix as in pnp/PnP-PowerShell#2796
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers committed Nov 16, 2020
1 parent 5b8bd5b commit 380a3bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Commands/Files/CopyFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ protected override void ExecuteCmdlet()
TargetUrl = UrlUtility.Combine(webServerRelativeUrl, TargetUrl);
}

string sourceFolder = SourceUrl.Substring(0, SourceUrl.LastIndexOf('/'));
Uri currentContextUri = new Uri(ClientContext.Url);
Uri sourceUri = new Uri(currentContextUri, SourceUrl);
Uri sourceUri = new Uri(currentContextUri, sourceFolder);
Uri sourceWebUri = Microsoft.SharePoint.Client.Web.WebUrlFromFolderUrlDirect(ClientContext, sourceUri);
Uri targetUri = new Uri(currentContextUri, TargetUrl);
Uri targetWebUri = Microsoft.SharePoint.Client.Web.WebUrlFromFolderUrlDirect(ClientContext, targetUri);
Expand Down

0 comments on commit 380a3bd

Please sign in to comment.