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:
parent
2f6b635f66
commit
41a90ad71f
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user