throw new ArgumentNullException("cloudFile");\r
if (String.IsNullOrWhiteSpace(cloudFile.Account))\r
throw new ArgumentNullException("cloudFile");\r
- if (String.IsNullOrWhiteSpace(cloudFile.Container))\r
+ if (cloudFile.Container==null)\r
+ throw new ArgumentNullException("cloudFile");\r
+ if (cloudFile.Container.IsAbsoluteUri)\r
throw new ArgumentNullException("cloudFile");\r
if (String.IsNullOrWhiteSpace(filePath))\r
throw new ArgumentNullException("filePath");\r
}\r
\r
var localPath = info.FullName;\r
- var relativeUrl = new Uri(cloudFile.Name, UriKind.Relative);\r
+ var relativeUrl = cloudFile.Name;\r
\r
var url = relativeUrl.ToString();\r
- if (cloudFile.Name.EndsWith(".ignore", StringComparison.InvariantCultureIgnoreCase))\r
+ if (url.EndsWith(".ignore", StringComparison.InvariantCultureIgnoreCase))\r
return finalHash;\r
\r
if (!Selectives.IsSelected(accountInfo,cloudFile))\r
if (isChanged)\r
{\r
//Retrieve the hashmap from the server\r
- var serverHash = await client.GetHashMap(account, container, url).ConfigureAwait(false);\r
+ var serverHash = await client.GetHashMap(account, container, relativeUrl).ConfigureAwait(false);\r
//If it's a small file\r
if (serverHash.Hashes.Count == 1)\r
//Download it in one go\r
Directory.CreateDirectory(tempFolder);\r
\r
//Download the object to the temporary location\r
- await client.GetObject(cloudFile.Account, cloudFile.Container, relativeUrl.ToString(), tempPath, cancellationToken).ConfigureAwait(false);\r
+ await client.GetObject(cloudFile.Account, cloudFile.Container, relativeUrl, tempPath, cancellationToken).ConfigureAwait(false);\r
\r
//Create the local folder if it doesn't exist (necessary for shared objects)\r
var localFolder = Path.GetDirectoryName(localPath);\r