diff --git a/lib/ace/worker/worker_client.js b/lib/ace/worker/worker_client.js index 525e8add..f024b274 100644 --- a/lib/ace/worker/worker_client.js +++ b/lib/ace/worker/worker_client.js @@ -104,7 +104,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) { this.$normalizePath = function(path) { if (!path.match(/^\w+:/)) - path = location.protocol + "//" + location.host + location.pathname.replace(/\/.*?$/, "") + "/" + path.replace(/^\//, ""); + path = location.protocol + "//" + location.host + location.pathname.replace(/\/[^\/]*$/, "") + "/" + path.replace(/^\//, ""); return path; };