diff options
Diffstat (limited to 'Mammoth/Couscous/java')
| -rw-r--r-- | Mammoth/Couscous/java/net/URI.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Mammoth/Couscous/java/net/URI.cs b/Mammoth/Couscous/java/net/URI.cs index 818d694..6a18c23 100644 --- a/Mammoth/Couscous/java/net/URI.cs +++ b/Mammoth/Couscous/java/net/URI.cs @@ -31,11 +31,8 @@ namespace Mammoth.Couscous.java.net { return new URI(new Uri(_uri, relativeUri)); } else { var path = _uri.ToString(); - var lastSlashIndex = path.LastIndexOf("/"); - var basePath = lastSlashIndex == -1 - ? "." - : path.Substring(0, lastSlashIndex + 1); - return new URI(basePath + relativeUri); + var basePath = System.IO.Path.GetDirectoryName(path); + return new URI(System.IO.Path.Combine(basePath, relativeUri)); } } } |
