4 Attachment(s)
Issues with long path names
Hi!
We recently had a request to accommodate very long path names in our programs. In testing, we have run into a couple of issues with SB10 when trying to install into those folders with long names.
Issue #1 demonstrates an error after a long path name has been selected.
Attachment 4533Attachment 4534Attachment 4535
Issue #2 is with a slightly shorter path that seems to get past the first error, but fails as well.
Attachment 4536
Thanks,
Tom
Re: Issues with long path names
Hi Tom,
Hmmm, interesting. Would it be possible for you to send me your test project (.sbp)?
Thanks,
Friedrich
Re: Issues with long path names
Tom,
I can reproduce this now, definitely a buffer-overrun bug in the SB runtime! Thank you for bringing this to my attention. Item in review.
Friedrich
2 Attachment(s)
Re: Issues with long path names
Update 1: most internal and external I/O components in SetupBuilder make use of the standard MAX_PATH in the Windows APIs. The maximum length for a path is MAX_PATH, which is defined as 260 characters. We have to check if it's possible to increase MAX_PATH without creating negative side effects :-(
Update 2: starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. We have to find out how to handle this scenario for Windows environments prior Windows 10, version 1607 and how to opt-in to the new behavior. Interesting problem. In the Windows APIs to create, say, a directory, the specified path cannot be so long that you cannot append an 8.3 file name (that is, the directory name cannot exceed MAX_PATH minus 12).
Update 3: even WinZip only supports the "Simple Long Path" method. 260 characters is the maximum (the unzip process fails here because the internal folder structure and the output folder is >260 bytes). But of course, we have to fix the buffer-overrun bug in SB.
To sum it up: 260 bytes is the expected limit for all systems prior Windows 10, version 1607.
Friedrich
Re: Issues with long path names
Friedrich,
Thanks for looking into it! I understand the overall 260 limit, the kicker was having a segment of the path be so long even if the total was valid. My testers report that somewhere between 170 and 180 is the fall-over/error.
Thanks for the stellar support, as usual.
Tom H.
Re: Issues with long path names
Hi Tom,
Thank you !!! :) It will definitely be fixed in the soon coming maintenance build.
Friedrich
Re: Issues with long path names
Any indication when 'soon' might be?
I know, I know... later than 'now', but before 'later'.:p
Thanks,
Tom
Re: Issues with long path names
....better than "one day after never" <vbg> ;)
I'll send you a test SB version (with the buffer overrun fix and the RTF hyperlink enhancement) within the next 48 hours.
Friedrich
1 Attachment(s)
Re: Issues with long path names
Hi Tom,
Even a target directory with 225 bytes plus a "Test" subfolder (5 bytes) plus SB10.EXE filename (8 bytes) work fine (= 238 bytes). I can't reproduce the 170-180 bytes limit on any machine here :(
Update: the limit is (with no buffer-overrun): 251 bytes.
Friedrich
1 Attachment(s)
Re: Issues with long path names
Update 2: 252 bytes gives this (but still no buffer-overrun). The target path can't be created, because it's too long. Adding more bytes and beginning with 268 bytes, we see a buffer-overrun (this has to be fixed).
Update 3: I have fixed the buffer-overrun bug in our recursive "Create Folder" function.
Friedrich