* fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to

set st_nlink correctly, just set it to 1 to avoid potential network
	timeouts.
This commit is contained in:
Corinna Vinschen 2012-02-14 15:22:13 +00:00
parent ab9108200f
commit 5401796acf
2 changed files with 7 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2012-02-14 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to
set st_nlink correctly, just set it to 1 to avoid potential network
timeouts.
2012-02-14 Corinna Vinschen <corinna@vinschen.de>
* flock.cc (lf_setlock): Don't close waited lock object handle before

View File

@ -2393,15 +2393,7 @@ fhandler_cygdrive::fstat (struct __stat64 *buf)
fhandler_base::fstat (buf);
buf->st_ino = 2;
buf->st_mode = S_IFDIR | STD_RBITS | STD_XBITS;
if (!ndrives)
set_drives ();
char flptst[] = "X:";
int n = ndrives;
for (const char *p = pdrive; p && *p; p = strchr (p, '\0') + 1)
if (is_floppy ((flptst[0] = *p, flptst))
|| GetFileAttributes (p) == INVALID_FILE_ATTRIBUTES)
n--;
buf->st_nlink = n + 2;
buf->st_nlink = 1;
return 0;
}