aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.iplog
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2010-12-10 21:58:05 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2011-01-28 01:11:12 +0100
commit38eec8f4a26935ba9e75bfbdde8a5682e05f338d (patch)
treee609e5e005fed86ef245b1646010312eaa0a3a61 /org.eclipse.jgit.iplog
parentf5fe2dca3cb9f57891e1a4b18832fcc158d0c490 (diff)
downloadjgit-38eec8f4a26935ba9e75bfbdde8a5682e05f338d.tar.gz
jgit-38eec8f4a26935ba9e75bfbdde8a5682e05f338d.zip
[findbugs] Do not ignore exceptional return value of mkdir
java.io.File.mkdir() and mkdirs() report failure as an exceptional return value false. Fix the code which silently ignored this exceptional return value. Change-Id: I41244f4b9d66176e68e2c07e2329cf08492f8619 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.iplog')
-rw-r--r--org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java
index 372469da04..ba10f6f24e 100644
--- a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java
+++ b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java
@@ -62,6 +62,7 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.storage.file.LockFile;
import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
/**
* Manages the {@code .eclipse_iplog} file in a project.
@@ -187,8 +188,7 @@ public class IpLogMeta {
*/
public void syncCQs(File file, FS fs, URL base, String username,
String password) throws IOException, ConfigInvalidException {
- if (!file.getParentFile().exists())
- file.getParentFile().mkdirs();
+ FileUtils.mkdirs(file.getParentFile(), true);
LockFile lf = new LockFile(file, fs);
if (!lf.lock())