No 'ls' if media isn't mounted
This commit is contained in:
committed by
Scott Lahteine
parent
d94b5b5ad0
commit
f7cb9455c8
@ -276,8 +276,10 @@ void CardReader::printListing(SdFile parent, const char * const prepend/*=nullpt
|
||||
// List all files on the SD card
|
||||
//
|
||||
void CardReader::ls() {
|
||||
root.rewind();
|
||||
printListing(root);
|
||||
if (flag.mounted) {
|
||||
root.rewind();
|
||||
printListing(root);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
|
||||
|
Reference in New Issue
Block a user