mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-02-18 18:32:29 -07:00
Fix workDirParents -> getAbsFilename relationship
This commit is contained in:
parent
27d70599d4
commit
0385acea7a
2 changed files with 5 additions and 12 deletions
|
|
@ -584,22 +584,15 @@ void CardReader::chdir(const char * relpath) {
|
|||
SERIAL_ECHOLN(relpath);
|
||||
}
|
||||
else {
|
||||
if (workDirDepth < MAX_DIR_DEPTH) {
|
||||
++workDirDepth;
|
||||
for (int d = workDirDepth; d--;) workDirParents[d + 1] = workDirParents[d];
|
||||
workDirParents[0] = *parent;
|
||||
}
|
||||
if (workDirDepth < MAX_DIR_DEPTH)
|
||||
workDirParents[workDirDepth++] = *parent;
|
||||
workDir = newfile;
|
||||
}
|
||||
}
|
||||
|
||||
void CardReader::updir() {
|
||||
if (workDirDepth > 0) {
|
||||
--workDirDepth;
|
||||
workDir = workDirParents[0];
|
||||
for (uint16_t d = 0; d < workDirDepth; d++)
|
||||
workDirParents[d] = workDirParents[d+1];
|
||||
}
|
||||
if (workDirDepth > 0)
|
||||
workDir = workDirParents[--workDirDepth];
|
||||
}
|
||||
|
||||
void CardReader::printingHasFinished() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue