Răsfoiți Sursa

BugFix use 'url' insteadof 'path'

* path.resolve(...) returns 'c:\...' on Windows
Yuki Takei 9 ani în urmă
părinte
comite
42c7585535

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