diff --git a/core/rfb.js b/core/rfb.js index 5aa5a1db..ae4d13d2 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -393,8 +393,8 @@ RFB.prototype = { } var relpath = location.pathname.split('/'); - relpath.splice(1, -1); - relpath = relpath.join('/') + '/'; + relpath[relpath.length - 1] = ""; + relpath = relpath.join("/"); uri += '://' + this._rfb_host + ':' + this._rfb_port + relpath + this._rfb_path; Log.Info("connecting to " + uri);