Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Text Buffer cleanup #989

Merged
merged 11 commits into from
Oct 17, 2013
Merged

Text Buffer cleanup #989

merged 11 commits into from
Oct 17, 2013

Conversation

probablycorey
Copy link

This finalizes some low level asynchronous file reading calls and ensures that Atom fails (but does not crash) when opening files larger than 1MB.

if not @exists()
promise = Q(null)
else if not @cachedContents? or flushCache
if fs.statSync(@getPath()).size >= 1048576 # 1MB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use fs.statSyncNoException or maybe add fsUtils.getSize() which uses it. 🐎

probablycorey pushed a commit that referenced this pull request Oct 17, 2013
@probablycorey probablycorey merged commit 766634c into master Oct 17, 2013
@probablycorey probablycorey deleted the cj-text-buffer-cleanup branch October 17, 2013 18:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants