Skip to content

Commit

Permalink
Merge pull request #40 from yar229/develop
Browse files Browse the repository at this point in the history
fixed work with items at root folder
  • Loading branch information
yar229 authored Dec 9, 2016
2 parents 1e0db57 + e6edfbf commit d0e0085
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions WebDavMailRuCloudStore/Mailru/StoreBase/MailruStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,14 @@ private string GetPathFromUri(Uri uri)
////can't use uri.LocalPath and so on cause of special signs

//var requestedPath = Regex.Replace(uri.AbsoluteUri, @"^http?://.*?/", string.Empty);
var requestedPath = Regex.Replace(uri.OriginalString, @"^http?://.*?/", string.Empty);
var requestedPath = Regex.Replace(uri.OriginalString, @"^http?://.*?(/|\Z)", string.Empty);
requestedPath = "/" + requestedPath.TrimEnd('/');

if (string.IsNullOrWhiteSpace(requestedPath)) requestedPath = "/";

requestedPath = Uri.UnescapeDataString(requestedPath);

return requestedPath;

//var requestedPath = uri.LocalPath;
//requestedPath = requestedPath.TrimEnd('/');
//requestedPath = HttpUtility.UrlDecode(requestedPath);
//if (string.IsNullOrWhiteSpace(requestedPath)) requestedPath = "/";
//return requestedPath;
}
}
}

0 comments on commit d0e0085

Please sign in to comment.