This is the mail archive of the
mailing list for the Cygwin project.
Re: Another long pathname question
On Thu, Feb 26, 2009 at 4:19 AM, Corinna Vinschen
> 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
>> ? longer than 260 bytes, or if the current working directory is a virtual
>> ? path (like /proc, /cygdrive, //server), don't call native Win32 programs
>> ? 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. ?The CWD is stored in the PEB
> (process environment block) of every process. ?It's stored as path as
> well as as handle. ?Unfortunately the CWD in the PEB is a static storage
> area of 520 bytes == 260 (MAX_PATH) wide characters. ?That's why no
> Win32 process can have a long path as CWD. ?See also
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
Interesting trick. Maybe you should consider something similar for cygwin.
Litigation Triage Solutions Specialist
First 99 Days Litigation White Paper -
The Norcross Group
The Intersection of Evidence & Technology
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html