in sonar-plugin-server/src/main/java/jetbrains/buildserver/sonarplugin/tool/SonarQubeToolProvider.java [116:136]
public void unpackToolPackage(@NotNull final Path toolPath, @NotNull final Path targetPath) throws ToolException {
try {
Files.createDirectory(targetPath);
} catch (IOException ignore) {
}
{
final String error = checkDirectory(targetPath, "Cannot unpack " + toolPath + " to " + targetPath);
if (error != null) {
LOG.warn(error);
throw new ToolException(error);
}
}
final Matcher dirMatcher = myPackedSonarQubeScannerRootDirPattern.matcher(targetPath.getFileName().toString());
if (!dirMatcher.matches()) {
throw new ToolException("Unexpected target directory name: should match '" + myPackedSonarQubeScannerRootDirPattern.pattern() + "' while got " + targetPath.getFileName().toString());
}
mySimpleZipToolProvider.layoutContents(toolPath, targetPath);
}