Browse Source

Fix compilation against latest MK3 branch

D.R.racer 3 years ago
parent
commit
8d39880abf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Firmware/cardreader.cpp

+ 2 - 2
Firmware/cardreader.cpp

@@ -506,9 +506,9 @@ void CardReader::openFileWrite(const char* name)
     }
     sdprinting = false;
     
-    SdFile myDir;
     const char *fname=name;
-    diveSubfolder(fname,myDir);
+    if (!diveSubfolder(fname))
+      return;
     
     //write
     if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)){