public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Cc: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Subject: Re: directories named '...' (dotdotdot) do not work
Date: Wed, 02 Feb 2011 22:20:00 -0000	[thread overview]
Message-ID: <20110202221958.GT2675@calimero.vinschen.de> (raw)
In-Reply-To: <20110202221139.GS2675@calimero.vinschen.de>

On Feb  2 23:11, Corinna Vinschen wrote:
> On Feb  2 15:01, Eric Blake wrote:
> > On 02/02/2011 02:53 PM, Corinna Vinschen wrote:
> > > [...]
> > > To fix that, we would have to scan the entire path for path components
> > > which contain leading spaces or trailing dots or spaces.  That makes
> > > fork even slower than it already is.
> > 
> > Well, that would only be if the path is shorter than MAX_PATH (256)
> > bytes, so it's not like we have a quadratic scaling problem over
> > thousands of bytes.  Furthermore, using a directory literally named
> > '...' already causes problems for windows programs that ar not long-path
> > aware, so the workaround is no worse than what they currently get from
> > such a path.  But you're right, that taking the time to scan for any
> > occurrence of:
> > 
> > '.\', './', '/.', ' \', ' /'
> > 
> > and checking for five patterns across 256 bytes definitely adds time.
> > 
> > > Given that it works fine on Vista and Windows 7 anyway, is it really
> > > worth to add this extra code just to support an old OS in a very rare
> > > situation?  
> > 
> > Can't we make the scan conditional on the windows version?  That is,
> > spend the extra time to keep XP happy, but skip the scan on newer Windows?
> 
> I'm not opposed to a pre-Vista workaround.  The code should be added to
> the "if (runpath)" code starting at line 494 in spawn.cc.  If you have
> an idea how to do this test as fast as possible, please send a patch.

Oh, btw., only three patterns.  At this point in the code the slashes
are already converted to backslashes.


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

  reply	other threads:[~2011-02-02 22:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 19:15 Ralf Wildenhues
2011-02-02 20:46 ` Corinna Vinschen
2011-02-02 20:51   ` marco atzeri
2011-02-02 21:14     ` Lee Rothstein
2011-02-02 21:18       ` Andrew DeFaria
2011-02-02 20:56   ` Eric Blake
2011-02-02 21:29     ` Corinna Vinschen
2011-02-02 21:32       ` Corinna Vinschen
2011-02-02 21:55         ` Christian Franke
2011-02-02 22:07           ` Corinna Vinschen
2011-02-02 21:54       ` Corinna Vinschen
2011-02-02 22:01         ` Eric Blake
2011-02-02 22:12           ` Corinna Vinschen
2011-02-02 22:20             ` Corinna Vinschen [this message]
2011-02-03  6:39           ` Ralf Wildenhues
2011-02-03  9:43             ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110202221958.GT2675@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).