Adafruit_LittleFS_File.cpp::truncate: change default value of ret to

LFS_ERR_ISDIR.
This commit is contained in:
Steven James committed 2020-06-26 04:04:44 -04:00
1 parent 4a26462db9
commit 85b6e26dc9
1 file changed
+2 -2
@@ -274,7 +274,7 @@ uint32_t File::size (void)
bool File::truncate (uint32_t pos)
{
uint32_t ret=1;
int32_t ret=LFS_ERR_ISDIR;
_fs->_lockFS();
if (!this->_is_dir)
{
@@ -286,7 +286,7 @@ bool File::truncate (uint32_t pos)
bool File::truncate (void)
{
uint32_t ret=1;
int32_t ret=LFS_ERR_ISDIR;
uint32_t pos;
_fs->_lockFS();
if (!this->_is_dir)