delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <20090226091943.GU18319@calimero.vinschen.de> |
References: | <87f94c370902251558n2f671e39i9ac95d0b749a0514 AT mail DOT gmail DOT com> <20090226091943 DOT GU18319 AT calimero DOT vinschen DOT de> |
Date: | Thu, 26 Feb 2009 14:29:57 -0500 |
Message-ID: | <87f94c370902261129u47d48d95g3213f85edf8b6283@mail.gmail.com> |
Subject: | Re: Another long pathname question |
From: | Greg Freemyer <greg DOT freemyer AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Thu, Feb 26, 2009 at 4:19 AM, Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote: > On Feb 25 18:58, Greg Freemyer wrote: >> I just read the release email for 1.7.0 >> >> In part it says: >> >> - Fallout from the long path names: If the current working directory is >> =A0 longer than 260 bytes, or if the current working directory is a virt= ual >> =A0 path (like /proc, /cygdrive, //server), don't call native Win32 prog= rams >> =A0 since they don't understand these paths. >> >> I've done a fair amount of long path name testing in Vista / Win2008, >> and I'd like to understand the above in more detail. > > It's a restriction of Win32 processes. =A0The CWD is stored in the PEB > (process environment block) of every process. =A0It's stored as path as > well as as handle. =A0Unfortunately the CWD in the PEB is a static storage > area of 520 bytes =3D=3D 260 (MAX_PATH) wide characters. =A0That's why no > Win32 process can have a long path as CWD. =A0See also > http://msdn.microsoft.com/en-us/library/aa365530(VS.85).aspx > > > Corinna I just created a long path with long individual directory names and placed junk.txt in it both at one of the upper directories, and way down at the bottom. Then I used file explorer to open both via notepad. Using task manager I can see the full invocation arguments (view enables the command line field). If the path is short, it uses the full long directory name as expected. If the path exceeds 260, it reverts to using the 8.3 names, thus giving a workaround that will allow you to descend deeper into a directory structure. Interesting trick. Maybe you should consider something similar for cygwin. Greg --=20 Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |