fix isDirectory() to return false instead of failing
This commit is contained in:
parent
51f9d76a64
commit
bd50c122eb
7
dist/smartfile.fs.js
vendored
7
dist/smartfile.fs.js
vendored
File diff suppressed because one or more lines are too long
@ -43,7 +43,11 @@ export let fileExists = function (filePath) {
|
||||
* Checks if given path points to an existing directory
|
||||
*/
|
||||
export let isDirectory = function (pathArg): boolean {
|
||||
try {
|
||||
return plugins.fsExtra.statSync(pathArg).isDirectory()
|
||||
} catch (err) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user