[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

[MD:1741]Meadow 1.13 Beta 1 (TANAHASHI:61) release.



Kenichi Handa <handa@xxxxxxxxx> writes:

> この件まとめてもらえれば、僕から彼に伝えても良いですが。

これはかなり致命的な問題なんで、さっさとpatchを作りました。
存在チェックだけでなく、directoryか否かのcheckも必要です。

半田さんが報告されるなら、以下のパッチもよろしければ、どうぞ。
## 私がやっても良いですけど。

from himi

Index: fileio.c
===================================================================
RCS file: g:/repdev/Meadow/src/fileio.c,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 fileio.c
*** fileio.c	2000/04/04 08:31:36	1.1.1.7
--- fileio.c	2000/04/13 08:32:23
***************
*** 2929,2940 ****
      return (check_writable (XSTRING (encoded)->data)
  	    ? Qt : Qnil);
  
- #ifdef WINDOWSNT
-   /* The read-only attribute of the parent directory doesn't affect
-      whether a file or directory can be created within it.  Some day we
-      should check ACLs though, which do affect this.  */
-   return Qt;
- #else
    dir = Ffile_name_directory (absname);
  #ifdef VMS
    if (!NILP (dir))
--- 2929,2934 ----
***************
*** 2946,2951 ****
--- 2940,2953 ----
  #endif /* MSDOS */
  
    dir = ENCODE_FILE (dir);
+ #ifdef WINDOWSNT
+   /* The read-only attribute of the parent directory doesn't affect
+      whether a file or directory can be created within it.  Some day we
+      should check ACLs though, which do affect this.  */
+   if (stat (XSTRING (dir)->data, &statbuf) < 0)
+     return Qnil;
+   return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
+ #else
    return (check_writable (!NILP (dir) ? (char *) XSTRING (dir)->data : "")
  	  ? Qt : Qnil);
  #endif