summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/helper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-19 15:24:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-19 15:54:42 +0000
commit69fd971e684779bd7e500333a7c7d3814fffd111 (patch)
treed31388bb6b990be08de58acb0933712f4c01a0d9 /qadevOOo/runner/helper
parent7dd73ab0ce7d446b604936942937123adf3ea782 (diff)
coverity#1326953 RV: Bad use of return value
and coverity#1326954 RV: Bad use of return value coverity#1326955 RV: Bad use of return value coverity#1326956 RV: Bad use of return value coverity#1326957 RV: Bad use of return value coverity#1326958 RV: Bad use of return value coverity#1326959 RV: Bad use of return value coverity#1326960 RV: Bad use of return value coverity#1326961 RV: Bad use of return value coverity#1326962 RV: Bad use of return value Change-Id: I02c2f7a5214e348f06a12b78a9400d8501b00e57
Diffstat (limited to 'qadevOOo/runner/helper')
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java30
1 files changed, 18 insertions, 12 deletions
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index 6d03e5d5a031..62ac34f528d9 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -738,21 +738,27 @@ public class OfficeProvider implements AppProvider
}
}
-private void deleteFilesAndDirector(File file)
+ private void deleteFilesAndDirector(File file)
+ {
+ File f = file;
+ if(f.isDirectory())
{
- File f = file;
- if(f.isDirectory())
+ File files[] = f.listFiles();
+ for(int i = 0; i < files.length; i++)
{
- File files[] = f.listFiles();
- for(int i = 0; i < files.length; i++)
- {
- deleteFilesAndDirector(files[i]);
- }
- f.delete();
+ deleteFilesAndDirector(files[i]);
}
- else if (f.isFile())
- {
- f.delete();
+ boolean bDeleteOk = f.delete();
+ if (!bDeleteOk) {
+ System.out.println("delete failed");
}
}
+ else if (f.isFile())
+ {
+ boolean bDeleteOk = f.delete();
+ if (!bDeleteOk) {
+ System.out.println("delete failed");
+ }
+ }
+ }
}