Don't crash if there's no sd card

custom
jacqueline 2 years ago
parent ebcdf93930
commit 876e5e70e9
  1. 6
      src/app_console/app_console.cpp

@ -27,6 +27,12 @@ int CmdListDir(int argc, char** argv) {
return 1;
}
auto lock = sInstance->database_.lock();
if (lock == nullptr) {
std::cout << "storage is not available" << std::endl;
return 1;
}
std::string path;
if (argc == 2) {
path = toSdPath(argv[1]);

Loading…
Cancel
Save