diff --git a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java index 8842eee..0175344 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/FileUploadPanel.java @@ -96,6 +96,9 @@ public class FileUploadPanel extends FormPanel { uploadButton.setEnabled(fileUploadField.isValid()); String path = fileUploadField.getValue(); int punto = path.lastIndexOf("."); + if(punto<0){ + punto=path.length(); + } int slash = path.lastIndexOf("/"); int backslash = path.lastIndexOf("\\"); String filename="";