Skip to content

Commit

Permalink
Fixed an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-pluskal committed Dec 14, 2016
1 parent b4ed287 commit 3b67e40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/io/github/mzmine/util/FileNameUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public class FileNameUtil {

public static @Nonnull String findCommonSuffix(
@Nonnull List<File> fileNames) {
if (fileNames.size() < 2) {

if (fileNames.isEmpty())
return "";

if (fileNames.size() == 1) {
// Return file extension
String ext = Files
.getFileExtension(fileNames.get(0).getAbsolutePath());
Expand Down

0 comments on commit 3b67e40

Please sign in to comment.