tika-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1213136 - /tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java
Date Mon, 12 Dec 2011 03:07:51 GMT
Author: nick
Date: Mon Dec 12 03:07:51 2011
New Revision: 1213136

URL: http://svn.apache.org/viewvc?rev=1213136&view=rev
Log:
TIKA-809 Handle embedded files with no file extension

Modified:
    tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java

Modified: tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java?rev=1213136&r1=1213135&r2=1213136&view=diff
==============================================================================
--- tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java (original)
+++ tika/trunk/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java Mon Dec 12 03:07:51
2011
@@ -575,7 +575,13 @@ public class TikaGUI extends JFrame
       }
       
       public File requestSave(String embeddedName) throws IOException {
-         String suffix = embeddedName.substring(embeddedName.lastIndexOf('.'));
+         String suffix = ".tika";
+         
+         int splitAt = embeddedName.lastIndexOf('.');
+         if (splitAt > 0) {
+            embeddedName.substring(splitAt);
+         }
+         
          File tmp = File.createTempFile("tika-embedded-", suffix);
          wanted.put(embeddedName, tmp);
          return tmp;



Mime
View raw message