X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 23 Apr 2010 10:45:43 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: PLEASE TEST YOUR FS (was Re: 1.7.1: cvs version   built in is     unstable)
Message-ID: <20100423084543.GC15379@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4BBBDA78.10002@cwilson.fastmail.fm>  <20100407083403.GD27428@calimero.vinschen.de>  <20100407085343.GY18530@calimero.vinschen.de>  <C742AC34C772EC4BAAF642C22E6079D30123F71F32E8@NSPEXMBX-A.the-lab.llnl.gov>  <20100407170643.GF18530@calimero.vinschen.de>  <20100407172659.GH18530@calimero.vinschen.de>  <20100422094145.GF1845@calimero.vinschen.de>  <8CCC8F85C5F2784387A32FAD835FB4E602DBF139B5@server03>  <20100422121213.GG1845@calimero.vinschen.de>  <20100422175108.GM1845@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20100422175108.GM1845@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Apr 22 19:51, Corinna Vinschen wrote:
> On Apr 22 14:12, Corinna Vinschen wrote:
> > Thank you.   Oh well.  When trying to open the file to check for its
> > existance, the NT status code is STATUS_OBJECT_NAME_NOT_FOUND which is
> > equivalent to the POSIX errno ENOENT, "No such file or directory".
> > 
> > Only afterwards, when trying to create the file, the status code is
> > STATUS_OBJECT_NAME_INVALID.  Too late for Cygwin.
> 
> I've just applied a patch which is supposed to fix this problem.
> 
> The core component which evaluates a file and performs basic checks now
> handles the case STATUS_OBJECT_NAME_NOT_FOUND specially.  It checks if
> the filename has leading spaces and/or trailing dots and spaces.  If so,
> it checks the filesystem.  If it's one of the known FSes with broken
> (aka DOS-only) path handling, it removes the offending leading spaces
> and trailing dots and spaces and tries again.
> 
> So this:
> 
>   $ touch "  abc    ...   "
> 
> will create the file
> 
>   "  abc    ...   "
> 
> for instance on NTFS or FAT, but it will create the file
> 
>   "abc"
> 
> on NetApp, NWFS and other filesystems recognized as CIFS (but not Samba).
> 
> This behaviour is equivalent to the behaviour in native Win32
> applications and in Cygwin 1.5.
> 
> While I tested the patch, I had to fake a detail to make it work on
> NTFS.  I have no access to one of the broken filesystems myself, so
> a bit of testing under real-life conditions would be quite helpful.
> 
> So I'd like to urge all users who could reproduce the aforementioned
> problems to test the *next* Cygwin DLL from the Cygwin Developer
> Snapshots URL http://cygwin.com/snapshots/  and report back if it works
> or if it doesn't.  *If* it doesn't work, please report the FS and
> describe the scenario.
> 
> Oh, hey, the cvs problem which started this thread would be quite a
> nice test.

The patch is available in the latest snapshot from 2010-04-22.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

