Fix GetLabel() for the virtual drive.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4128
This commit is contained in:
parent
50d6368b14
commit
30ef5aefe9
2 changed files with 7 additions and 3 deletions
|
@ -205,11 +205,11 @@ bool Virtual_Drive::FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst) {
|
|||
Bit8u attr;char pattern[DOS_NAMELENGTH_ASCII];
|
||||
dta.GetSearchParams(attr,pattern);
|
||||
if (attr == DOS_ATTR_VOLUME) {
|
||||
dta.SetResult("DOSBOX",0,0,0,DOS_ATTR_VOLUME);
|
||||
dta.SetResult(GetLabel(),0,0,0,DOS_ATTR_VOLUME);
|
||||
return true;
|
||||
} else if ((attr & DOS_ATTR_VOLUME) && !fcb_findfirst) {
|
||||
if (WildFileCmp("DOSBOX",pattern)) {
|
||||
dta.SetResult("DOSBOX",0,0,0,DOS_ATTR_VOLUME);
|
||||
if (WildFileCmp(GetLabel(),pattern)) {
|
||||
dta.SetResult(GetLabel(),0,0,0,DOS_ATTR_VOLUME);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -271,3 +271,6 @@ Bits Virtual_Drive::UnMount(void) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
char const* Virtual_Drive::GetLabel(void) {
|
||||
return "DOSBOX";
|
||||
}
|
||||
|
|
|
@ -396,6 +396,7 @@ public:
|
|||
bool isRemote(void);
|
||||
virtual bool isRemovable(void);
|
||||
virtual Bits UnMount(void);
|
||||
virtual char const* GetLabel(void);
|
||||
private:
|
||||
VFILE_Block * search_file;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue