Boost logo

Boost :

Subject: Re: [boost] Making Boost.Filesystem work with GENERAL filenames with g++ in Windows (a solution)
From: Alf P. Steinbach (alf.p.steinbach+usenet_at_[hidden])
Date: 2011-10-26 11:18:33

On 26.10.2011 16:19, Sergey Cheban wrote:
> 26.10.2011 14:59, Alf P. Steinbach пишет:
>> However the MAX_PATH issue is not really an issue in practice.
>> The *only* uses I have seen of paths longer than MAX_PATH, have been
>> silly script-kiddies trying to create problems for people running FTP
>> servers. And that's because the ordinary tools can't handle them, thus,
>> difficult to remove the script-kiddie's nested folders. Conversely, as a
>> serious software developer one should stay well away from such paths.
> Please note that the following filename is very close to the limit:
> bin.v2\libs\program_options\build\msvc-10.0\release\address-model-64\architecture-x86\link-static\runtime-link-static\threading-multi\libboost_program_options-vc100-mt-s-1_47.lib

d:\> set

d:\> for %f in (%LONGNAME%) do @set SHORTNAME=%~sf & echo %~sf

d:\> echo function print(s) { WScript.StdOut.WriteLine( s ); } >x.js

d:\> echo print( "long name is " + "%LONGNAME%".length + " characters."
) >>x.js

d:\> echo print( "short name is " + "%SHORTNAME%".length + "
characters." ) >>x.js

d:\> cscript /nologo x.js
long name is 167 characters.
short name is 94 characters.

d:\> _

It's about 2/3 of the way (as I recall MAX_PATH is 260 or thereabouts).

The short name is about 1/3 of the way.

> I even had real problems with building Boost from the not-so-long
> subfolder of the my home folder.

Yes, evidently those who thought it was a good idea to encode file
properties as nested folders, were used to a system supporting
arbitrarily long paths as well as symlinks. I.e. *nix. While Windows, in
spite of early Posix 0.9 support, didn't support symlinks until the
latest version, Windows 7.

Perhaps, in addition to adding g++ support in Boost.Filesystem, it might
be a good idea if Someone(TM) told whomever is responsible for that
enthusiastic folder nesting, that some other scheme might fit better in
the non-*nix world?

Or even in *nix... ;-) <g>

Cheers & hth.,

- Alf

Boost list run by bdawes at, gregod at, cpdaniel at, john at