From 8e17515b273e25d8dc774d0a792f1104c8920588 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 19 May 2017 16:36:03 -0500 Subject: [PATCH] Fix auto expand condition --- deps/ox/src/ox/fs/filesystem.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ox/src/ox/fs/filesystem.hpp b/deps/ox/src/ox/fs/filesystem.hpp index a0983114..72ab885b 100644 --- a/deps/ox/src/ox/fs/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem.hpp @@ -551,7 +551,7 @@ int FileSystemTemplate::write(const char *path, void *buffer #endif template int FileSystemTemplate::write(uint64_t inode, void *buffer, uint64_t size, uint8_t fileType) { - if (size > this->size()) { + if (m_autoExpand && m_store->spaceNeeded(size) > m_store->available()) { expand(this->size() * 2); } return m_store->write(inode, buffer, size, fileType);