Menu

#396 SysFileTree Problem w/ paths > 260 bytes

v3.9.1
closed-fixed
Regutil (6)
7
2016-01-20
2012-11-26
No

I am trying to work with SysFileTree on Windows 7 SP1(NTFS) 64bit and Regina 3.6 (tried 3.7 also) but I get a message box (from Windows) that pops up saying that Regina has encountered a problem and needs to close. It happens under the following condition:

SysFileTree using the 'L' or 'T' option and the path information length is greater than 260 bytes(this is _MAX_PATH).

If I use the 'O' option, everything runs fine. Unfortunately, I need to look at the data from the 'L' option. Also, I have 1561 folder names that exceed 259 bytes, the longest being 326 bytes plus filenames up to 167 bytes. So, I'm not going to escape this one easily. This is considered by MSDN.com an extended path. They advise allocating up to 32767 bytes so as to not cause buffer overruns.

While I was listing the root folder using SysFileTree, I noticed a minor problem if SysFileTree is attempting to maintain columns with the 'L' option and have attached the console log. Look at pagefile.sys. The preallocated length for 'size' isn't large enough to contain 10+GByte numbers. The numbers are correct though. This forced me to move some rexx code into a loop that only needs to be executed once to determine what column locations contain data that I want to look at. It's a difference of 1 time execution vs approx 85K executes - Performance!

Discussion

  • Jerry Senowitz

    Jerry Senowitz - 2012-11-26

    Root folder listing

     
  • Jerry Senowitz

    Jerry Senowitz - 2012-11-26
    • priority: 5 --> 7
     
  • Mark Hessling

    Mark Hessling - 2015-04-04
    • status: open --> pending
    • Group: v3.6 --> Next Release
     
  • Mark Hessling

    Mark Hessling - 2015-04-04

    I've changed the default path length for SysFileTree to 32767. This should resolve this error.

    Also added a new option: H for specifying reporting of 'huge' files. If you need to parse the output of a directory and have files with a file size greater than 10 significant digits, the layout for all files will now be consistent (to 16 significant digits).

     
  • Mark Hessling

    Mark Hessling - 2015-04-04
    • Group: Next Release --> v3.9.1
     
  • Mark Hessling

    Mark Hessling - 2016-01-20
    • status: pending --> closed-fixed
     

Log in to post a comment.