Fixed Issue 459: Undefined error with some CSV files (incorrectly detected as EXCEL)

by favoring file name-based format over mime type-based format (because the user's computer might have .csv registered as an Excel format).

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2357 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2011-11-04 21:52:12 +00:00
parent 2f6b635f66
commit 41a90ad71f

View File

@ -275,11 +275,11 @@ public class ImportingManager {
return fileNameFormat; return fileNameFormat;
} else if (fileNameFormat == null) { } else if (fileNameFormat == null) {
return mimeTypeFormat; return mimeTypeFormat;
} else if (fileNameFormat.startsWith(mimeTypeFormat)) { } else if (mimeTypeFormat.startsWith(fileNameFormat)) {
// file name-based format is more specific // mime type-base format is more specific
return fileNameFormat;
} else {
return mimeTypeFormat; return mimeTypeFormat;
} else {
return fileNameFormat;
} }
} }