From 5debecf40f09942e0ec87adc2c961c1f7eb6994c Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Tue, 28 Jan 2003 21:18:55 +0000 Subject: [PATCH] GetFileAttr works now with dirs too. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@654 --- src/dos/drive_local.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dos/drive_local.cpp b/src/dos/drive_local.cpp index 36d38ac5..51b0420d 100644 --- a/src/dos/drive_local.cpp +++ b/src/dos/drive_local.cpp @@ -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; }