|
|
@ -584,22 +584,15 @@ void CardReader::chdir(const char * relpath) {
|
|
|
|
SERIAL_ECHOLN(relpath);
|
|
|
|
SERIAL_ECHOLN(relpath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (workDirDepth < MAX_DIR_DEPTH) {
|
|
|
|
if (workDirDepth < MAX_DIR_DEPTH)
|
|
|
|
++workDirDepth;
|
|
|
|
workDirParents[workDirDepth++] = *parent;
|
|
|
|
for (int d = workDirDepth; d--;) workDirParents[d + 1] = workDirParents[d];
|
|
|
|
|
|
|
|
workDirParents[0] = *parent;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
workDir = newfile;
|
|
|
|
workDir = newfile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CardReader::updir() {
|
|
|
|
void CardReader::updir() {
|
|
|
|
if (workDirDepth > 0) {
|
|
|
|
if (workDirDepth > 0)
|
|
|
|
--workDirDepth;
|
|
|
|
workDir = workDirParents[--workDirDepth];
|
|
|
|
workDir = workDirParents[0];
|
|
|
|
|
|
|
|
for (uint16_t d = 0; d < workDirDepth; d++)
|
|
|
|
|
|
|
|
workDirParents[d] = workDirParents[d+1];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CardReader::printingHasFinished() {
|
|
|
|
void CardReader::printingHasFinished() {
|
|
|
|