Some small compatibility changes
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1567
This commit is contained in:
parent
9048b0f14b
commit
a4e9443e59
1 changed files with 12 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_local.cpp,v 1.42 2004-01-10 14:03:34 qbix79 Exp $ */
|
||||
/* $Id: drive_local.cpp,v 1.43 2004-01-11 14:00:13 qbix79 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -122,6 +122,10 @@ bool localDrive::FindFirst(char * _dir,DOS_DTA & dta) {
|
|||
strcat(tempDir,_dir);
|
||||
CROSS_FILENAME(tempDir);
|
||||
|
||||
if (allocation.mediaid==0xF0 ) {
|
||||
EmptyCache(); //rescan floppie-content on each findfirst
|
||||
}
|
||||
|
||||
char end[2]={CROSS_FILESPLIT,0};
|
||||
if (tempDir[strlen(tempDir)-1]!=CROSS_FILESPLIT) strcat(tempDir,end);
|
||||
|
||||
|
@ -137,7 +141,13 @@ bool localDrive::FindFirst(char * _dir,DOS_DTA & dta) {
|
|||
Bit8u sAttr;
|
||||
dta.GetSearchParams(sAttr,tempDir);
|
||||
if ((sAttr & DOS_ATTR_VOLUME) && (*_dir==0)) {
|
||||
// Get Volume Label (DOS_ATTR_VOLUME) and only in basedir
|
||||
// Get Volume Label (DOS_ATTR_VOLUME) and only in basedir
|
||||
if ( strcmp(dirCache.GetLabel(), "") == 0 ) {
|
||||
LOG(LOG_DOS,LOG_ERROR)("DRIVELABEL REQUESTED: none present, returned NOLABEL");
|
||||
dta.SetResult("NOLABEL",0,0,0,DOS_ATTR_VOLUME);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WildFileCmp(dirCache.GetLabel(),tempDir)) {
|
||||
// Get Volume Label
|
||||
dta.SetResult(dirCache.GetLabel(),0,0,0,DOS_ATTR_VOLUME);
|
||||
|
|
Loading…
Add table
Reference in a new issue