CoverityFix-CID:1351023 Bad use of return value 69/20369/2
Nimish Kapoor [Sat, 28 Jul 2018 12:38:49 +0000 (17:38 +0530)]
Change-Id: Id3ae28b6f3c84090649115b9ea523d1df7f810a4

scilab/modules/helptools/src/java/org/scilab/modules/helptools/CopyConvert.java

index 3b4f16a..af8e83b 100644 (file)
@@ -626,16 +626,28 @@ public class CopyConvert extends DefaultHandler implements ErrorHandler {
             // Delete all temporary files ---
             latexFile.delete();
             if (auxFile.isFile()) {
-                auxFile.delete();
+                if (!auxFile.delete())
+                {
+                    System.err.println("Cannot delete '" + auxFile + "'");
+                }
             }
             if (logFile.isFile()) {
-                logFile.delete();
+                if (!logFile.delete())
+                {
+                    System.err.println("Cannot delete '" + logFile + "'"); 
+                }
             }
             if (dviFile.isFile()) {
-                dviFile.delete();
+                if (!dviFile.delete())
+                {
+                    System.err.println("Cannot delete '" + dviFile + "'");
+                }
             }
             if (epsFile.isFile()) {
-                epsFile.delete();
+                if (!epsFile.delete())
+                {
+                    System.err.println("Cannot delete '" + epsFile + "'");
+                }
             }
         }
     }