Better test for drive letter

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Jan 14 04:43:43 CST 2002


Changelog
	dlls/msvcrt/file.c: _stat
	Better test for drive letter
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/msvcrt/file.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/file.c,v
retrieving revision 1.12
diff -u -r1.12 file.c
--- wine/dlls/msvcrt/file.c	26 Dec 2001 19:50:58 -0000	1.12
+++ wine/dlls/msvcrt/file.c	14 Jan 2002 10:42:04 -0000
@@ -957,8 +957,12 @@
 
   memset(buf,0,sizeof(struct _stat));
 
-  /* FIXME: rdev isnt drive num,despite what the docs say-what is it? */
-  if (isalpha(*path))
+  /* FIXME: rdev isnt drive num,despite what the docs say-what is it? 
+     Bon 011120: This fixme seems incorrect 
+                 Also a letter as first char isn't enough to be classify 
+		 as drive letter
+  */
+  if (isalpha(*path)&& (*(path+1)==':'))
     buf->st_dev = buf->st_rdev = toupper(*path - 'A'); /* drive num */
   else
     buf->st_dev = buf->st_rdev = _getdrive() - 1;




More information about the wine-patches mailing list