fix nffs_inode_read_filename does not update out_full_len

This commit is contained in:
hathach committed 2017-07-20 13:32:05 +07:00
1 parent f6a66d444a
commit 48718392c3
6 files changed
+59 -12

No files matched your search

+36
View File
@@ -199,3 +199,39 @@ bool ApacheNffs::testFolder(const char* path)
return result;
}
/*------------------------------------------------------------------*/
/* Debug
*------------------------------------------------------------------*/
void dbgPrintDir(const char* cwd)
{
// Open the input folder
NffsDir dir(cwd);
// File Entry Information which hold file attribute and name
NffsDirEntry dirEntry;
Serial.println(cwd);
// Loop through the directory
while( dir.read(&dirEntry) )
{
Serial.print("|_ ");
char eName[64];
dirEntry.getName(eName, sizeof(eName));
if ( dirEntry.isDirectory() )
{
Serial.print( eName );
Serial.println("/");
}else
{
NffsFile file(cwd, dirEntry, FS_ACCESS_READ);
Serial.printf("%-30s %d Bytes\n", eName, file.size() );
file.close();
}
}
dir.close();
}