Clean up a couple more format guessing issues left over from #685
This commit is contained in:
parent
ca09ae6f90
commit
d8d82bf8b7
@ -13,7 +13,7 @@ public class LineBasedFormatGuesser implements FormatGuesser {
|
||||
return "text/line-based/*sv";
|
||||
}
|
||||
int[] widths = FixedWidthImporter.guessColumnWidths(file, encoding);
|
||||
if (widths != null) {
|
||||
if (widths != null && widths.length > 0) {
|
||||
return "text/line-based/fixed-width";
|
||||
}
|
||||
return null;
|
||||
|
@ -270,7 +270,9 @@ public class ImportingManager {
|
||||
|
||||
static public String getFormat(String fileName, String mimeType) {
|
||||
String fileNameFormat = getFormatFromFileName(fileName);
|
||||
mimeType = mimeType.split(";")[0];
|
||||
if (mimeType != null) {
|
||||
mimeType = mimeType.split(";")[0];
|
||||
}
|
||||
String mimeTypeFormat = mimeType == null ? null : getFormatFromMimeType(mimeType);
|
||||
if (mimeTypeFormat == null) {
|
||||
return fileNameFormat;
|
||||
|
Loading…
Reference in New Issue
Block a user