Menu

#864 SysFileTree under win32 matches on long & short file names

5.0.0
closed
nobody
none
5
2023-01-01
2009-12-13
jfaucher
No

(see attached file)

Under win32 (and probably win64), call SysFileTree "*.odg", "files", "FO"
returns all the following files :
f.odga
f.odg1
.~lock.dlgArea.odg#

This is because the search made by FindFirstFile (and FindNextFile) includes the long and short file names (see MSDN).
This link brings more details : http://blogs.msdn.com/oldnewthing/archive/2005/07/20/440918.aspx

I leave you decide if this is a bug or not (in my opinion, it's not a bug. But could be an RFE : match only on long file names)

Jean-Louis

Discussion

  • jfaucher

    jfaucher - 2009-12-13
     
  • Rick McGuire

    Rick McGuire - 2013-11-22
    • Pending work items: --> none
    • Group: v4.0 --> None
     
  • Rick McGuire

    Rick McGuire - 2019-01-24

    It looks like there might now be a simple fix for this problem:

    https://msdn.microsoft.com/en-us/library/aa364415(v=VS.85).aspx

    The gotcha is this might be the change that officially kills the ability to run on XP.

     
  • Erich

    Erich - 2019-01-24

    We really must add another option if we implement this. The current SysFileTree default behaviour is exactly how DIR behaves, so this should be kept.
    If adding the match-on-long only behaviour is implemented with a new option that doesn't work on XP, we could conditionally compile this for Windows 7 and above only, or just document this as a restriction.

     
  • Erich

    Erich - 2019-12-22
    • status: open --> pending
    • Group: None --> 5.0.0
     
  • Erich

    Erich - 2019-12-22

    This should be fixed with the latest trunk
    Additional SysFileTree tests committed with revision [r11966]

     

    Related

    Commit: [r11966]

  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel