Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 6 Sep 2002 11:04:17 -0400 (EDT)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: "Watts, Simon (UK)" <swatts@northgrum-it.eu.com>
cc: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: RE: cygpath -s behaviour
In-Reply-To: <4F055774D458D51195BC000347246B39E80397@xcguk001.inri.co.uk>
Message-ID: <Pine.GSO.4.44.0209061102270.13825-100000@slinky.cs.nyu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 6 Sep 2002, Watts, Simon (UK) wrote:

> >   DWORD len = GetShortPathName (filename, buf, MAX_PATH);
> >   if (len == 0 && GetLastError () == ERROR_INVALID_PARAMETER)
> >     {
> >       fprintf (stderr, "%s: cannot create short name of %s\n", prog_name,
> >                filename);
> >       exit (2);
> >     }
>
> The above code snippet is as in the src.tar.bz2 archive for the
> version of cygwin which I have.
>
> V strange, this should work...
>
> Check that GetShortPathName _is_ returning 0 on fail?  Try
> the test 'len <= 0' instead?

http://msdn.microsoft.com/library/en-us/fileio/base/getshortpathname.asp

Oh, and while I still have a chance, I'd like to point out that I'm not a
cygwin developer or maintainer, just someone who looked at the code... :-D
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

