Skip to content

Commit 85b6e26

Browse files
committed
Adafruit_LittleFS_File.cpp::truncate: change default value of ret to
LFS_ERR_ISDIR.
1 parent 4a26462 commit 85b6e26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/Adafruit_LittleFS/src/Adafruit_LittleFS_File.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ uint32_t File::size (void)
274274

275275
bool File::truncate (uint32_t pos)
276276
{
277-
uint32_t ret=1;
277+
int32_t ret=LFS_ERR_ISDIR;
278278
_fs->_lockFS();
279279
if (!this->_is_dir)
280280
{
@@ -286,7 +286,7 @@ bool File::truncate (uint32_t pos)
286286

287287
bool File::truncate (void)
288288
{
289-
uint32_t ret=1;
289+
int32_t ret=LFS_ERR_ISDIR;
290290
uint32_t pos;
291291
_fs->_lockFS();
292292
if (!this->_is_dir)

0 commit comments

Comments
 (0)