Subdirectory provided by Embedded Artists

Dependencies:   DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos mbed-src

Dependents:   lpc4088_displaymodule_hello_world_Sept_2018

Fork of DMSupport by Embedded Artists

Revision:
33:8a0a99d54bf8
Parent:
29:b1ec19000e15
--- a/FileSystems/QSPIFileSystem.cpp	Thu Feb 19 12:23:04 2015 +0000
+++ b/FileSystems/QSPIFileSystem.cpp	Thu Feb 19 14:41:14 2015 +0100
@@ -1405,6 +1405,11 @@
 DirHandle *QSPIFileSystem::opendir(const char *name)
 {
   if (isformatted()) {
+    if (*name == '\0') {
+        // opendir("/qspi/") will result in a call to this function with name=""
+        return QSPIDirHandle::openDir(name);
+    }
+    
     FileHandle* fh = open(name, O_RDONLY);
     if (fh != NULL) {
       // Attempting to open a file as a dir