Commit a8322d0b authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

_stat: Better test for drive letter.

parent aae77c6d
......@@ -957,9 +957,13 @@ int _stat(const char* path, struct _stat * buf)
memset(buf,0,sizeof(struct _stat));
/* FIXME: rdev isnt drive num,despite what the docs say-what is it? */
if (isalpha(*path))
buf->st_dev = buf->st_rdev = toupper(*path - 'A'); /* drive num */
/* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment