Alexandre Julliard : ntdll: Ignore failure to open current directory,
it' s broken on Mac OS X.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 29 14:43:32 CDT 2007
Module: wine
Branch: master
Commit: 6d1402cd89741db1dc23480f258fde711587410c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6d1402cd89741db1dc23480f258fde711587410c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 29 21:02:59 2007 +0200
ntdll: Ignore failure to open current directory, it's broken on Mac OS X.
---
dlls/ntdll/directory.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 697fd1a..50aaa27 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1507,7 +1507,8 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
if (show_dot_files == -1) init_options();
- if ((cwd = open(".", O_RDONLY)) != -1 && fchdir( fd ) != -1)
+ cwd = open( ".", O_RDONLY );
+ if (fchdir( fd ) != -1)
{
#ifdef VFAT_IOCTL_READDIR_BOTH
if ((read_directory_vfat( fd, io, buffer, length, single_entry, mask, restart_scan )) != -1)
@@ -1526,7 +1527,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
read_directory_readdir( fd, io, buffer, length, single_entry, mask, restart_scan );
done:
- if (fchdir( cwd ) == -1) chdir( "/" );
+ if (cwd == -1 || fchdir( cwd ) == -1) chdir( "/" );
}
else io->u.Status = FILE_GetNtStatus();
More information about the wine-cvs
mailing list