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

Add an optional mode argument to QDir::mkdir(name [, mode]), QFile::open(...)

    XMLWordPrintable

    Details

    • Type: User Story
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.3.0 Alpha
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      All
    • Story Points:
      13
    • Sprint:
      Team 1 Foundation_Sprint 44, Team 1 Foundation_Sprint 45, Team 2 Foundation_Sprint 46, Team 2 Foundation_Sprint 47, Team 2 Foundation_Sprint 48
    • Commits:
      83f2f27bb6cac0b85cdb47365347493d8dc5feb2 (qt/qtbase/dev)

      Description

      When we create a directory, we should enable the code creating it to stipulate its mode at the time of creation so that native APIs that support this can do so directly or we do so as soon as possible thereafter if native APIs don't. The default should be conservative (only present user can access, with full access), or determined by a system-specific default (where one exists) such as umask.

      The present API requires one to create the directory, then set its permissions as a separate action; that introduces a potential race condition where it has some default set of permissions which may allow another process to do things in it before the code creating the directory sets the permissions it actually intends. In any case, specifying the mode at creation time is Good Practice and nicely convenient for the client code.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              ievgenii.meshcheriakov Ievgenii Meshcheriakov
              Reporter:
              Eddy Edward Welbourne
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: