GetFileAttr works now with dirs too.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@654
This commit is contained in:
parent
e9f1f898d7
commit
5debecf40f
1 changed files with 3 additions and 3 deletions
|
@ -167,9 +167,9 @@ bool localDrive::GetFileAttr(char * name,Bit16u * attr) {
|
|||
strcat(newname,name);
|
||||
CROSS_FILENAME(newname);
|
||||
dirCache.ExpandName(newname);
|
||||
FILE * hand=fopen(newname,"rb");
|
||||
if (hand) {
|
||||
fclose(hand);
|
||||
|
||||
struct stat status;
|
||||
if (stat(newname,&status)==0) {
|
||||
*attr=DOS_ATTR_ARCHIVE;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue