Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-475

Install fails if target file is read only

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 1.1.0
    • General
    • None
    • Windows, QtCreator 3.0 beta
    • f8f985af535712e051be28883aef9199cde3b022

    Description

      When trying to install a file which is marked as read-only, installation fails if the file was changed but a previous read-only copy already exists at the target location. This scenario can easily happen with SCCM systems like Perforce, where unmodified checked-out files always are marked as read-only.

      Example: Given the following QBS code:

      Product {
          Group {
              name: "MyFiles"
              qbs.install: true
              qbs.installDir: "my_target"
              files : [ "my.file" ]
          }
      }
      

      When executing "install" on this, my.file is copied to my_target. However, since the source file was checked-out from Perforce, it is marked as read-only. After copying it to the target, the copy of my.file also is marked as read-only. Now if the source changes for some reason and "install" is executed again, it fails with this error message:

      :-1: error: Installation error: Could not copy file 'my_source\my.file' to 'my_target\my.file'. Destination file exists

      If the read-only mark is manually removed from the target, everything works fine. My suggestion would be to always remove the read-only mark after copying.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            thomas.epting Thomas Epting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes