[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
[MD:1741]Meadow 1.13 Beta 1 (TANAHASHI:61) release.
- X-ml-count: 1741
- Subject: [MD:1741]Meadow 1.13 Beta 1 (TANAHASHI:61) release.
- From: Miyashita Hisashi(宮下 尚:HIMI) <himi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 13 Apr 2000 17:33:23 +0900
- User-agent: T-gnus/6.14.1 (based on Gnus v5.8.3) SEMI/1.13.5 (Meihō) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i386-*-nt5.0.2195) MULE/4.1 (AOI) Meadow/1.13 Beta1 (TANAHASHI:61)
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