Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 388d9b6

Browse files
Merge pull request #2 from Sertonix/remove-fs-plus
remove fs-plus
2 parents 8b3291e + d43e2fc commit 388d9b6

File tree

5 files changed

+656
-8
lines changed

5 files changed

+656
-8
lines changed

lib/snippet-body-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ try {
33
parser = require('./snippet-body')
44
} catch (error) {
55
const {allowUnsafeEval} = require('loophole')
6-
const fs = require('fs-plus')
6+
const fs = require('fs')
77
const PEG = require('pegjs')
88

99
const grammarSrc = fs.readFileSync(require.resolve('./snippet-body.pegjs'), 'utf8')

lib/snippets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const {Emitter, Disposable, CompositeDisposable, File} = require('atom')
33
const _ = require('underscore-plus')
44
const async = require('async')
55
const CSON = require('season')
6-
const fs = require('fs-plus')
6+
const fs = require('fs')
77
const ScopedPropertyStore = require('scoped-property-store')
88

99
const Snippet = require('./snippet')
@@ -273,8 +273,8 @@ module.exports = {
273273
},
274274

275275
loadSnippetsDirectory (snippetsDirPath, callback) {
276-
fs.isDirectory(snippetsDirPath, isDirectory => {
277-
if (!isDirectory) { return callback(null, {}) }
276+
fs.stat(snippetsDirPath, (error, stat) => {
277+
if (error || !stat.isDirectory()) return callback(null, {});
278278

279279
fs.readdir(snippetsDirPath, (error, entries) => {
280280
if (error) {

0 commit comments

Comments
 (0)