Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 23 Jun 2005 15:11:07 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Coreutils (mv) bug Message-ID: <20050623191107.GA11489@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <062320051900 DOT 17633 DOT 42BB06CF0007C754000044E122007610640A050E040D0C079D0A AT comcast DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <062320051900.17633.42BB06CF0007C754000044E122007610640A050E040D0C079D0A@comcast.net> User-Agent: Mutt/1.5.8i On Thu, Jun 23, 2005 at 07:00:31PM +0000, Eric Blake wrote: >> On Thu, Jun 23, 2005 at 06:11:42PM +0000, Eric Blake wrote: >> >It would be really nice if there were a new flag to access() that supressed >> >.exe expansion, and succeeded only if the exact spelling matched. Then >> >my test to see if .exe should be appended would be as simple as >> >access("foo", F_OK) == 0 && access("foo", F_OK | __NO_EXE_MAGIC) == -1. >> >Furthermore, access() seems like it may be more efficient than open() in >> >terms of the underlying work that must be done to implement it. >> >> Just append a dot to the end of the filename. > >That currently doesn't work on managed mounts, where .exe magic still >happens but trailing dots no longer get stripped. Whatever trick coreutils >uses to undo .exe magic must work in all cases, so it would really be nice >if there were a blessed cygwin syscall that made supressing .exe magic >easy. Er, yes. I think you've already made that point. Since managed mounts are rare you could solve 99% of the problems by doing what I mentioned. Just don't do it for managed mounts. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/