rename path to pathModule

pull/1052/head
ioedeveloper 4 years ago
parent 78ed6ef7ca
commit c3daceae24
  1. 6
      apps/remix-ide/src/app/files/workspaceFileProvider.js

@ -1,7 +1,7 @@
'use strict'
const FileProvider = require('./fileProvider')
const path = require('path')
const pathModule = require('path')
class WorkspaceFileProvider extends FileProvider {
constructor () {
@ -43,9 +43,9 @@ class WorkspaceFileProvider extends FileProvider {
isSubDirectory (parent, child) {
if (!parent) return false
if (parent === child) return true
const relative = path.relative(parent, child)
const relative = pathModule.relative(parent, child)
return !!relative && relative.split(path.sep)[0] !== '..'
return !!relative && relative.split(pathModule.sep)[0] !== '..'
}
resolveDirectory (path, callback) {

Loading…
Cancel
Save