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;
} else if (fileNameFormat == null) {
return mimeTypeFormat;
} else if (fileNameFormat.startsWith(mimeTypeFormat)) {
// file name-based format is more specific
return fileNameFormat;
} else {
} else if (mimeTypeFormat.startsWith(fileNameFormat)) {
// mime type-base format is more specific
return mimeTypeFormat;
} else {
return fileNameFormat;
}
}