Fix auto expand condition

This commit is contained in:
Gary Talent 2017-05-19 16:36:03 -05:00
parent e195c10d6d
commit 8e17515b27

View File

@ -551,7 +551,7 @@ int FileSystemTemplate<FileStore, FS_TYPE>::write(const char *path, void *buffer
#endif
template<typename FileStore, FsType FS_TYPE>
int FileSystemTemplate<FileStore, FS_TYPE>::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);