* 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:
parent
ab9108200f
commit
5401796acf
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user