diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 9a285356..bf356a94 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -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 #include @@ -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);