From: fujieda AT jaist DOT ac DOT jp (Kazuhiro Fujieda) Subject: handling file attributes 16 Oct 1998 02:02:21 -0700 Message-ID: <3627056A.1BD34CC4.cygnus.cygwin32.developers@jaist.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit To: cygwin32-developers AT cygnus DOT com In the latest snapshot, there are two problems about handling file attributes. one: fhandler_disk_file::open desn't check the magic number '#!' on NT. fhandler.cc:1075 if (!real_path.exec_p && os_being_run != winNT) When NTEA is enabled, this causes no problem by doing chmod +x. But when NTEA is disabled by default, I can't execute shell scripts having the same name as .exe files in another path. I think it should always check the magic number or not check only when NTEA is enabled. two: stat() system call about a symlink always returns st_mode having S_IFLINK bit. This bug is caused by the constructor of path_conv class. Whenever the src path is a symlink, It set symlink_p to true regardless of the follow_mode. The following patch works fine. --- path.cc- Fri Oct 16 17:00:47 1998 +++ path.cc Fri Oct 16 17:01:48 1998 @@ -287,9 +287,9 @@ { if (component == 0) { - symlink_p = 1; // last component of path was a symlink. if (!follow_mode) { + symlink_p = 1; // last component of path was a symlink. fileattr = attr; return; } ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology