Commit fb8edc0b authored by Eli Zaretskii's avatar Eli Zaretskii

(stat): Treat UNC file names as residing on remote drives. (Bug#3542)

parent 28528402
2009-07-09 Eli Zaretskii <eliz@gnu.org>
* w32.c (stat): Treat UNC file names as residing on remote
drives. (Bug#3542)
2009-07-09 Kenichi Handa <handa@m17n.org>
* fontset.c (fontset_find_font): Fix previous change.
......
......@@ -3347,11 +3347,13 @@ stat (const char * path, struct stat * buf)
}
}
/* GetDriveType needs the root directory of NAME's drive. */
if (!(strlen (name) >= 2 && IS_DEVICE_SEP (name[1])))
devtype = GetDriveType (NULL); /* use root of current diectory */
if (IS_DIRECTORY_SEP (name[0]) && IS_DIRECTORY_SEP (name[1]))
devtype = DRIVE_REMOTE; /* assume UNC name is remote */
else if (!(strlen (name) >= 2 && IS_DEVICE_SEP (name[1])))
devtype = GetDriveType (NULL); /* use root of current drive */
else
{
/* GetDriveType needs the root directory of NAME's drive. */
strncpy (drive_root, name, 3);
drive_root[3] = '\0';
devtype = GetDriveType (drive_root);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment