|
@ -18,6 +18,8 @@ CardReader::CardReader() |
|
|
saving = false; |
|
|
saving = false; |
|
|
logging = false; |
|
|
logging = false; |
|
|
autostart_atmillis=0; |
|
|
autostart_atmillis=0; |
|
|
|
|
|
workDirDepth = 0; |
|
|
|
|
|
memset(workDirParents, 0, sizeof(workDirParents)); |
|
|
|
|
|
|
|
|
autostart_stilltocheck=true; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
|
|
|
autostart_stilltocheck=true; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
|
|
|
lastnr=0; |
|
|
lastnr=0; |
|
@ -521,19 +523,24 @@ void CardReader::chdir(const char * relpath) |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
workDirParentParent=workDirParent; |
|
|
if (workDirDepth < MAX_DIR_DEPTH) { |
|
|
workDirParent=*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(!workDir.isRoot()) |
|
|
if(workDirDepth > 0) |
|
|
{ |
|
|
{ |
|
|
workDir=workDirParent; |
|
|
--workDirDepth; |
|
|
workDirParent=workDirParentParent; |
|
|
workDir = workDirParents[0]; |
|
|
|
|
|
int d; |
|
|
|
|
|
for (int d = 0; d < workDirDepth; d++) |
|
|
|
|
|
workDirParents[d] = workDirParents[d+1]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|