• LRN's avatar
    Straighten up the GFileType vs symlinks on Windows situation · 19608e36
    LRN authored
    On Windows NTFS symlinks are implemented as reparse points,
    which are special kinds of files *or directories*. A directory
    symlink should link to a directory. A file symlink should link
    to a file. Mismatching (such as a file symlink pointing to a
    directory) produces symlinks that simply do not function.
    
    Therefore GFileType file vs directory vs symlink distinction is
    too simplistic to correctly represent a NTFS filesystem object type.
    
    Since we can't turn back time and choose a better way of representing
    file types, make GFileType reflect the file vs directory type on
    Windows, meaning that all FS objects are either files or
    directories (or shortcuts, which are also files), but never symlinks.
    
    A test for symlinkiness will have to be made via GFileInfo - it
    tracks symlinkiness separately from file/directory/whatever.
    19608e36