Explorar el Código

BugFix use 'url' insteadof 'path'

* path.resolve(...) returns 'c:\...' on Windows
Yuki Takei hace 9 años
padre
commit
42c7585535
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      packages/growi-plugin-lsx/src/lib/util/LsxPageListRenderer.js

+ 3 - 3
packages/growi-plugin-lsx/src/lib/util/LsxPageListRenderer.js

@@ -1,5 +1,5 @@
 const debug = require('debug')('crowi-plugin:lsx:util:LsxPageListRenderer');
-const path = require('path');
+const url = require('url');
 
 class LsxPageListRenderer {
 
@@ -34,8 +34,8 @@ class LsxPageListRenderer {
       lsxPrefix = lsxOptions.prefix || splittedArgs[0];
     }
 
-    // resolve path
-    const pagePath = path.resolve(fromPagePath, lsxPrefix);
+    // resolve url
+    const pagePath = url.resolve(fromPagePath, lsxPrefix);
     const queryOptions = {}
 
     // find pages