+2012-10-05 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
+ that time stamps of directories could also be changed. Don't
+ request the too broad GENERIC_WRITE, only the more restrictive
+ FILE_WRITE_ATTRIBUTES access rights.
+
+ * fileio.c (Fset_file_times): Special-case ignoring errors for
+ directories only on MSDOS, not on MS-Windows.
+
2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
* minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
{
if (set_file_times (-1, SSDATA (encoded_absname), t, t))
{
-#ifdef DOS_NT
+#ifdef MSDOS
struct stat st;
/* Setting times on a directory always fails. */
}
/* Need write access to set times. */
- fh = CreateFile (name, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0, OPEN_EXISTING, 0, NULL);
+ fh = CreateFile (name, FILE_WRITE_ATTRIBUTES,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
if (fh != INVALID_HANDLE_VALUE)
{
convert_from_time_t (times->actime, &atime);