diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-02-14 19:22:13 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-02-14 19:22:13 +0400 |
commit | 5401796acfc2b971a2f2c62eb43dab4ba540b0e5 (patch) | |
tree | 6a95d76b1976155e5d5b8c910a7c0d7822b0bd3c /winsup/cygwin/fhandler_disk_file.cc | |
parent | ab9108200f4dd4bda1e5e33d22f17cfb53dff243 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index a418657e7..13b9d6919 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -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; } |