tmf.ui: Avoid creating two Files for an archive import
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 15 Dec 2016 15:50:20 +0000 (10:50 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 15 Dec 2016 18:20:59 +0000 (13:20 -0500)
Change-Id: I2f74d283d07da528101b3e44715afe6b2dc35971
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/87248
Reviewed-by: Hudson CI
Reviewed-by: Marc-André Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-André Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ArchiveUtil.java

index e1ff0fa611ce38a157afa587ccfee4066df2bd19..253a2f63369df5869bf405d9079850300b94d102 100644 (file)
@@ -104,12 +104,13 @@ public class ArchiveUtil {
         }
 
         // FIXME: Work around Bug 463633. Remove this block once we move to Eclipse 4.5.
-        if (new File(fileName).length() < 512) {
+        File tarCandidate = new File(fileName);
+        if (tarCandidate.length() < 512) {
             return null;
         }
 
         try {
-            return new TarFile(fileName);
+            return new TarFile(tarCandidate);
         } catch (IOException e) {
             // ignore
         }
This page took 0.024995 seconds and 5 git commands to generate.