Re: extra long filenames and WTL

"Thomas Hruska [email protected] [wtl]" <[email protected]> Sun, 16 Oct 2016 14:29:05 -0700
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
On 10/16/2016 3:09 AM, [email protected] [wtl] wrote:
> with extra long filenames becoming a reality there needs to be some dusting off with WTL headers that specify MAX_PATH constant. Instead of fixed buffers we'd better off using CStrings everywhere. See here
>
>  www.zabkat.com/blog/long-8.3-path-names.htm http://www.zabkat.com/blog/long-8.3-path-names.htm

LFN is not really that hard to support.

https://github.com/cubiclesoft/cross-platform-cpp/blob/master/utf8/utf8_file_dir.cpp

I used static 8KB buffers there, which, even at 5 bytes per Unicode code 
point (worst case scenario), is still 6.3 times more storage space than 
the 260 byte limit.  Very few people (if any) are going to hit the wall 
at that limit.  Stack space is cheap and fast - it's just a pointer move 
on Intel chips which doesn't increase executable size - and you get 1MB 
of stack space to play with per thread on Windows.  The only issue here 
to be concerned with is overflowing the stack, which going the full 32KB 
could run a risk of if something calls too deeply.  I've personally hit 
the MAX_PATH 260 byte limit a couple of times but I've never even come 
close to hitting my 8KB limit.

-- 
Thomas Hruska
CubicleSoft President

I've got great, time saving software that you will find useful.

http://cubiclesoft.com/


------------------------------------
Posted by: Thomas Hruska <[email protected]>
------------------------------------