Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75869

Make Qt aware of symlinks, junctions, and shortcuts on Windows

    XMLWordPrintable

    Details

    • Type: User Story
    • Status: In Progress
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.14, 5.15
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Qt has traditionally considered shortcut files (.lnk) on Windows to be the equivalent of symlinks on Unix file systems. Since NTFS has now for many versions supported proper symlinks, the interpretation of shotcut files as symlinks is confusing and error prone. The implementation as of today is also inconsistent.

      In addition, NTFS has the notion of junctions, which behave like hardlinks for directories, but need to be treated like symlinks in many ways (ie on the command line, they are removed via `rmdir` rather than with `del`). Qt currently has no way of reporting that a file system entry is a junction, which can lead to fatal data loss.

      Qt should

      • treat shortcut (.lnk) files as regular files (ie can delete them, report their file size), but be able to follow them
      • introduce a more comprehensive concept of "file type", reported by QFileInfo, replacing the overly simple "isSymLink" (which can then be made obsolete in Qt 5.15), so that applications can make well-informed decisions about how to treat a file system entry
      • provide appropriate implementations of basic file system operations (at the very least, use the correct way to remove a symlink in QFile::remove and QDir::remove/removeRecursively)

       

      This ticket collects the various relevant bugs in Qt.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-75869
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                vhilshei Volker Hilsheimer
                Reporter:
                vhilshei Volker Hilsheimer
                PM Owner:
                Harald Kjølberg
                RnD Owner:
                Volker Hilsheimer
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes