diff --git a/Atom/Classes/AtomController.m b/Atom/Classes/AtomController.m index e1e5f9f8d..c544b5aff 100644 --- a/Atom/Classes/AtomController.m +++ b/Atom/Classes/AtomController.m @@ -128,9 +128,8 @@ dispatch_async(backgroundQueue, ^{ NSFileManager *fm = [NSFileManager defaultManager]; - NSMutableArray *paths; + NSMutableArray *paths = [NSMutableArray array]; if (recursive) { - paths = [NSMutableArray array]; NSDirectoryEnumerator *enumerator = [fm enumeratorAtPath:path]; NSString *subpath; diff --git a/spec/stdlib/fs-spec.coffee b/spec/stdlib/fs-spec.coffee index 01f3f24ad..007af1abc 100644 --- a/spec/stdlib/fs-spec.coffee +++ b/spec/stdlib/fs-spec.coffee @@ -6,7 +6,7 @@ describe "fs", -> directoryPath = null beforeEach -> directoryPath = require.resolve 'fixtures/file-finder-dir' - fdescribe "when recursive is true", -> + describe "when recursive is true", -> it "returns a promise that resolves to the recursive contents of that directory", -> waitsFor (complete) -> fs.async.list(directoryPath, true).done (result) ->