O_DIRECTORY is Linux-specific. As is VFAT_IOCTL_READDIR_BOTH anyway ... ChangeLog: On Linux: avoid blocking in DOSFS_OpenDir_VFAT if specified path is not a directory Index: files/dos_fs.c =================================================================== RCS file: /home/wine/wine/files/dos_fs.c,v retrieving revision 1.129 diff -u -r1.129 dos_fs.c --- files/dos_fs.c 4 Apr 2003 22:05:10 -0000 1.129 +++ files/dos_fs.c 14 Apr 2003 19:50:23 -0000 @@ -75,6 +75,11 @@ #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, KERNEL_DIRENT [2] ) +/* To avoid blocking on non-directories in DOSFS_OpenDir_VFAT*/ +#ifndef O_DIRECTORY +# define O_DIRECTORY 0200000 /* must be directory */ +#endif + #else /* linux */ #undef VFAT_IOCTL_READDIR_BOTH /* just in case... */ #endif /* linux */ @@ -461,7 +466,7 @@ { #ifdef VFAT_IOCTL_READDIR_BOTH KERNEL_DIRENT de[2]; - int fd = open( unix_path, O_RDONLY ); + int fd = open( unix_path, O_RDONLY|O_DIRECTORY ); BOOL r = TRUE; /* Check if the VFAT ioctl is supported on this directory */