support .. as well

This commit is contained in:
Konstantin Käfer
2011-07-08 16:22:12 +02:00
parent 732033fc5c
commit 0dc04d0840

View File

@@ -40,10 +40,10 @@ function MBTiles(uri, callback) {
return;
}
if (uri.hostname === '.') {
if (uri.hostname === '.' || uri.hostname = '..') {
uri.pathname = uri.hostname + uri.pathname;
delete uri.hostname;
delete uri.host;
uri.pathname = '.' + uri.pathname;
}
this.filename = uri.pathname;