From 06e99de5eee1aa74c4da872bb3106e3109d5634c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 1 Sep 2017 09:54:54 +0800 Subject: [PATCH] update relpath creation --- core/rfb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);