Preserve CWD for write/remove file (#16667)

This commit is contained in:
Robby Candra
2020-01-27 07:34:17 +07:00
committed by Scott Lahteine
parent f6a6704b66
commit 48098b1675
2 changed files with 20 additions and 15 deletions

View File

@@ -125,7 +125,7 @@ public:
static inline uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
// Helper for open and remove
static const char* diveToFile(SdFile*& curDir, const char * const path, const bool echo=false);
static const char* diveToFile(const bool update_cwd, SdFile*& curDir, const char * const path, const bool echo=false);
#if ENABLED(SDCARD_SORT_ALPHA)
static void presort();