From 686b88fe602f8d759d58cb12a54d7092cddba24e Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 17 Oct 2013 11:35:10 -0700 Subject: [PATCH] Use fsUtils.statSyncNoException --- src/file.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file.coffee b/src/file.coffee index 6184c5903..3d37edc96 100644 --- a/src/file.coffee +++ b/src/file.coffee @@ -1,4 +1,3 @@ -fs = require 'fs' path = require 'path' pathWatcher = require 'pathwatcher' Q = require 'q' @@ -77,7 +76,7 @@ class File if not @exists() promise = Q(null) else if not @cachedContents? or flushCache - if fs.statSync(@getPath()).size >= 1048576 # 1MB + if fsUtils.statSyncNoException(@getPath()).size >= 1048576 # 1MB throw new Error("Atom can only handle files < 1MB, for now.") deferred = Q.defer()