Fix long standing weirdness with LBA: Copying of speech files failed. Don't cut off the next level if we stay in the same (large) directory. Thanks ripsaw
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3634
This commit is contained in:
parent
a408781809
commit
e7b2ddbedf
1 changed files with 10 additions and 6 deletions
|
@ -678,6 +678,7 @@ bool CMscdex::GetDirectoryEntry(Bit16u drive, bool copyFlag, PhysPt pathname, Ph
|
|||
char entryName[256];
|
||||
bool foundComplete = false;
|
||||
bool foundName;
|
||||
bool nextPart = true;
|
||||
char* useName = 0;
|
||||
Bitu entryLength,nameLength;
|
||||
// clear error
|
||||
|
@ -708,14 +709,15 @@ bool CMscdex::GetDirectoryEntry(Bit16u drive, bool copyFlag, PhysPt pathname, Ph
|
|||
if (!ReadSectors(GetSubUnit(drive),false,dirEntrySector,1,defBuffer)) return false;
|
||||
// Get string part
|
||||
foundName = false;
|
||||
if (searchPos) {
|
||||
useName = searchPos;
|
||||
searchPos = strchr(searchPos,'\\');
|
||||
if (nextPart) {
|
||||
if (searchPos) {
|
||||
useName = searchPos;
|
||||
searchPos = strchr(searchPos,'\\');
|
||||
}
|
||||
if (searchPos) { *searchPos = 0; searchPos++; }
|
||||
else foundComplete = true;
|
||||
}
|
||||
|
||||
if (searchPos) { *searchPos = 0; searchPos++; }
|
||||
else foundComplete = true;
|
||||
|
||||
do {
|
||||
entryLength = mem_readb(defBuffer+index);
|
||||
if (entryLength==0) break;
|
||||
|
@ -772,10 +774,12 @@ bool CMscdex::GetDirectoryEntry(Bit16u drive, bool copyFlag, PhysPt pathname, Ph
|
|||
// change directory
|
||||
dirEntrySector = mem_readd(defBuffer+index+2);
|
||||
dirSize = mem_readd(defBuffer+index+10);
|
||||
nextPart = true;
|
||||
} else {
|
||||
// continue search in next sector
|
||||
dirSize -= 2048;
|
||||
dirEntrySector++;
|
||||
nextPart = false;
|
||||
}
|
||||
};
|
||||
error = 2; // file not found
|
||||
|
|
Loading…
Add table
Reference in a new issue