[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32.c,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32.c,v |
Date: |
Fri, 15 Aug 2008 13:52:31 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 08/08/15 13:52:30
Index: w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -b -r1.151 -r1.152
--- w32.c 15 Aug 2008 12:48:21 -0000 1.151
+++ w32.c 15 Aug 2008 13:52:30 -0000 1.152
@@ -2879,6 +2879,8 @@
stat (const char * path, struct stat * buf)
{
char *name, *r;
+ char drive_root[4];
+ UINT devtype;
WIN32_FIND_DATA wfd;
HANDLE fh;
unsigned __int64 fake_inode;
@@ -2983,9 +2985,19 @@
}
}
+ /* 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 */
+ else
+ {
+ strncpy (drive_root, name, 3);
+ drive_root[3] = '\0';
+ devtype = GetDriveType (drive_root);
+ }
+
if (!(NILP (Vw32_get_true_file_attributes)
- || (EQ (Vw32_get_true_file_attributes, Qlocal) &&
- GetDriveType (name) != DRIVE_FIXED))
+ || (EQ (Vw32_get_true_file_attributes, Qlocal)
+ && devtype != DRIVE_FIXED && devtype != DRIVE_RAMDISK))
/* No access rights required to get info. */
&& (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS, NULL))
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/09
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/09
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/09
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/15
- [Emacs-diffs] Changes to emacs/src/w32.c,v,
Eli Zaretskii <=
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/15
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/15
- [Emacs-diffs] Changes to emacs/src/w32.c,v, Eli Zaretskii, 2008/08/30