Uploaded image for project: 'SonarQube Scanner API'
  1. SonarQube Scanner API
  2. SCANNERAPI-170

Properly handle case when SONAR_USER_HOME point to a symlink

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10
    • Component/s: None
    • Labels:
      None

      Description

      It doesn't fail but code is broken:

      if (!dir.isDirectory() || !dir.exists()) { // Test doesn't handle case when this is a symlink
            logger.debug("Create : " + dir.getAbsolutePath());
            try {
              Files.createDirectories(dir.toPath()); // Doesn't fail if file exists
            } catch (IOException e) {
              throw new IllegalStateException("Unable to create " + debugTitle + dir.getAbsolutePath(), e);
            }
          }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.henry Julien Henry
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: