diff --git a/js/web-server.js b/js/web-server.js index e3d38c1c..18179d7f 100644 --- a/js/web-server.js +++ b/js/web-server.js @@ -92,7 +92,10 @@ function lastmod(path) { * @returns {*} */ function getCachedFile(filePath, cpath, fn) { - let cachePath = ".cache/" + cpath.replace(/\//g,'_'), + let cachePath = ".cache/" + cpath + .replace(/\//g,'_') + .replace(/\\/g,'_') + .replace(/:/g,'_'), cached = fileCache[filePath], now = time(); @@ -182,9 +185,12 @@ function concatCode(array) { filepath; array.forEach((file, index) => { - if (file.charAt(0) === "/") { + if (file.charAt(0) === "/" || file.indexOf(":\\") > 0) { filepath = file; - cachepath = "js_mod" + file.replace(/\//g,'_'); + cachepath = "js_mod" + file + .replace(/\//g,'_') + .replace(/\\/g,'_') + .replace(/:/g,'_'); array[index] = cachepath.substring(3).replace('.js',''); fileMap[cachepath.replace("js_","js/")] = filepath; } else {