diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-03-24 12:13:25 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-03-24 12:14:08 +0100 |
commit | 2a3aba9720dd5c2afa717ec30b479402c1058c59 (patch) | |
tree | e115c8abc92a2b9e263292519a22196a9ff9bbcb /sonar-home/src/main | |
parent | eebd168bb5ee832190e9244dac03c14361511f2c (diff) | |
download | sonarqube-2a3aba9720dd5c2afa717ec30b479402c1058c59.tar.gz sonarqube-2a3aba9720dd5c2afa717ec30b479402c1058c59.zip |
SONAR-5062 Improve stability of tests
Diffstat (limited to 'sonar-home/src/main')
-rw-r--r-- | sonar-home/src/main/java/org/sonar/home/cache/FileCache.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java b/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java index 085e83b0f4b..a02eefc6d3e 100644 --- a/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java +++ b/sonar-home/src/main/java/org/sonar/home/cache/FileCache.java @@ -189,7 +189,10 @@ public class FileCache { File tempDir = createTempDir(); ZipUtils.unzip(cachedFile, tempDir, new LibFilter()); try { - FileUtils.moveDirectory(tempDir, destDir); + // Recheck in case of concurrent processes + if (!destDir.exists()) { + FileUtils.moveDirectory(tempDir, destDir); + } } catch (FileExistsException e) { // Ignore as is certainly means a concurrent process has unziped the same file } |