delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/23/03:00:57

From: fujieda AT jaist DOT ac DOT jp (Kazuhiro Fujieda)
Subject: Re: handling file attributes
23 Oct 1998 03:00:57 -0700 :
Message-ID: <uk91rei0t.fsf.cygnus.cygwin32.developers@parvati.will.or.jp>
References: <3627056A DOT 1BD34CC4 AT jaist DOT ac DOT jp>
Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.100 - "Shijima")
To: cygwin32-developers AT cygnus DOT com

>>> On Thu, 22 Oct 1998 08:23:33 -0400
>>> Christopher Faylor <cgf AT cygnus DOT com> said:

> If you'd like to rework
> this so that it is only active when NTEA is not activated then I'll add
> that change.

Umm...
What do you think about this ?

--- fhandler.cc-	Wed Oct 21 14:29:47 1998
+++ fhandler.cc	Fri Oct 23 17:39:16 1998
@@ -1076,7 +1076,10 @@
   if (!res)
     goto out;
 
-  if (!real_path.exec_p && os_being_run != winNT)
+  extern BOOL allow_ntea;
+
+  if (!real_path.exec_p &&
+      (os_being_run != winNT || !allow_ntea))
     {
       DWORD done;
       char magic[3];

By the way, the following code seems to be wastful.

path.cc:1517-
      /* Check the file's extended attributes, if it has any.  */
      int unixattr;

      if (get_file_attribute (path, &unixattr) > 0)
	{
	  if ((unixattr & STD_XBITS) != 0)
	    *exec = 1;
	  if (! S_ISLNK (unixattr))
	    ;
	}

The exec flag set by this code is used only to skip checking a
file suffix in fhandler.cc:1064-1066. get_file_attribute() is
too heavy for this purpose becase it read NTEA. These code can
be eliminted safly.
____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019