Browse Source

Add LF to file errors

Scott Lahteine 10 years ago
parent
commit
d2563804c8
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/cardreader.cpp

+ 3
- 3
Marlin/cardreader.cpp View File

259
   char *dirname_start, *dirname_end;
259
   char *dirname_start, *dirname_end;
260
   if (name[0] == '/') {
260
   if (name[0] == '/') {
261
     dirname_start = &name[1];
261
     dirname_start = &name[1];
262
-    while(dirname_start > 0) {
262
+    while (dirname_start > 0) {
263
       dirname_end = strchr(dirname_start, '/');
263
       dirname_end = strchr(dirname_start, '/');
264
       //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
264
       //SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start - name));
265
       //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
265
       //SERIAL_ECHO("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
309
     else {
309
     else {
310
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
310
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
311
       SERIAL_PROTOCOL(fname);
311
       SERIAL_PROTOCOL(fname);
312
-      SERIAL_PROTOCOLCHAR('.');
312
+      SERIAL_PROTOCOLPGM(".\n");
313
     }
313
     }
314
   }
314
   }
315
   else { //write
315
   else { //write
316
     if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
316
     if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
317
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
317
       SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
318
       SERIAL_PROTOCOL(fname);
318
       SERIAL_PROTOCOL(fname);
319
-      SERIAL_PROTOCOLCHAR('.');
319
+      SERIAL_PROTOCOLPGM(".\n");
320
     }
320
     }
321
     else {
321
     else {
322
       saving = true;
322
       saving = true;

Loading…
Cancel
Save