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

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



From: Kenichi Handa <handa@xxxxxxxxx> さん曰く
Subject: [MD:1739]Meadow 1.13 Beta 1 (TANAHASHI:61) release.
Message-ID: <200004130540.OAA23377@xxxxxxxxxxxxxxxx>
Date: Thu, 13 Apr 2000 14:40:37 +0900 (JST)

handa> Shun-ichi GOTO <gotoh@xxxxxxxxxxx> writes:
handa> > 『忘れた』というかen-bugが正解のように感じますけどね。
handa> > この関数の最後の check_writable() はwritable を検査すると同時に
handa> > ディレクトリの存在も一緒に検査していることになりますからね。
handa> > 現在の修正は『writable の検査は不要』との観点が念頭にあったため、
handa> > 存在チェックまでも省略してしまったという副作用のように思えます。
handa> > 直すならば check_writable() の中身を直すべきのような...
handa> 
handa> もう Andrew に報告されましたか?
handa> 
handa> まだなら、是非報告してください。
handa> 
handa> この件まとめてもらえれば、僕から彼に伝えても良いですが。

ちなみに、bug replort を立ち上げると、

In GNU Emacs 20.6.1 (i386-*-nt4.0.1381)
 of Thu Apr 13 2000 on ONION
configured using `configure NT'

です。

* 現象:
  Meadow-1.13b1(Emacs 20.6 base) で

   (file-writable-p "~/no-such-dir/foo") => t
                     ~~~~~~~~~~~~~ 存在しない directory

 となってしまうようになった。そのため、write できると考えて
 write-region などをすると、

 Opening output file: no such file or directory, /home/shirai/no-such-dir/foo

 と error で終了してしまう。


* 原因:
 "src/ChangeLog" の

 2000-02-23  Andrew Innes  <andrewi@xxxxxxx>

	* fileio.c (Ffile_writable_p) [WINDOWSNT]: If a file (or
	directory) doesn't exist, assume it can be created regardless of
	whether the parent directory is writable.  This is the correct
	thing to do, if we are not going to check the ACLs.

 の変更が原因と思われる。


* 推測:
 src/fileio.c 2928行目付近から推測すると

  encoded = ENCODE_FILE (absname);
  if (stat (XSTRING (encoded)->data, &statbuf) >= 0)
    return (check_writable (XSTRING (encoded)->data)
	    ? Qt : Qnil);

 にひっかからず、なおかつ、directory の存在確認をしないで

#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

 で return しているからと考えられる。

## * 修正方法: 私にはわかりません ^^;;;

ぐらいだと思うのですが、私は(情けないことに)まったく英語が書けな
いので、半田さんよろしくお願いします。(_ _)

-- 
白井秀行 (mailto:shirai@xxxxxxxxxxxxxxxxxxx)