* fhandler_disk_file.cc (fhandler_disk_file::opendir): Move setting

cfd->nohandle where it won't crash.
This commit is contained in:
Corinna Vinschen 2007-07-17 13:22:21 +00:00
parent 77ee880504
commit 822036b6c9
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-07-17 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Move setting
cfd->nohandle where it won't crash.
2007-07-16 Corinna Vinschen <corinna@vinschen.de> 2007-07-16 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (cygheap_user::curr_imp_token): Rename from current_token. * cygheap.h (cygheap_user::curr_imp_token): Rename from current_token.

View File

@ -1566,9 +1566,7 @@ fhandler_disk_file::opendir (int fd)
dir->__d_internal = (unsigned) new __DIR_mounts (pc.normalized_path); dir->__d_internal = (unsigned) new __DIR_mounts (pc.normalized_path);
d_cachepos (dir) = 0; d_cachepos (dir) = 0;
if (pc.iscygdrive ()) if (!pc.iscygdrive ())
cfd->nohandle (true);
else
{ {
if (fd < 0) if (fd < 0)
{ {
@ -1623,6 +1621,8 @@ fhandler_disk_file::opendir (int fd)
time on exit. Nasty, nasty... */ time on exit. Nasty, nasty... */
cfd = this; cfd = this;
dir->__d_fd = cfd; dir->__d_fd = cfd;
if (pc.iscygdrive ())
cfd->nohandle (true);
} }
set_close_on_exec (true); set_close_on_exec (true);
dir->__fh = this; dir->__fh = this;