Merge pull request #1227 from lioncash/android

DetectCoreDirectoryFragment: Fix indentation
This commit is contained in:
Twinaphex 2014-11-06 16:26:52 +01:00
commit 7c81cabe83

View File

@ -77,12 +77,12 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
/**
* Returns everything after the last . of the given file name or path.
*/
public static String getFileExt(String filePath)
private static String getFileExt(String filePath)
{
int i = filePath.lastIndexOf('.');
if (i >= 0)
return filePath.substring(i+1).toLowerCase();
return ""; // No extension
int i = filePath.lastIndexOf('.');
if (i >= 0)
return filePath.substring(i+1).toLowerCase();
return ""; // No extension
}
@Override
@ -188,24 +188,24 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
{
try
{
ZipFile zipFile = new ZipFile(chosenFile);
ZipFile zipFile = new ZipFile(chosenFile);
Enumeration<? extends ZipEntry> entries = zipFile.entries();
Enumeration<? extends ZipEntry> entries = zipFile.entries();
// Try to handle the case of small text files bundles with content.
long largestEntry = Long.MIN_VALUE;
// Try to handle the case of small text files bundles with content.
long largestEntry = Long.MIN_VALUE;
while (entries.hasMoreElements())
{
ZipEntry zipEntry = entries.nextElement();
if (zipEntry.getCompressedSize() >= largestEntry)
{
largestEntry = zipEntry.getCompressedSize();
fileExt = getFileExt(zipEntry.getName());
}
}
while (entries.hasMoreElements())
{
ZipEntry zipEntry = entries.nextElement();
if (zipEntry.getCompressedSize() >= largestEntry)
{
largestEntry = zipEntry.getCompressedSize();
fileExt = getFileExt(zipEntry.getName());
}
}
zipFile.close();
zipFile.close();
}
catch(IOException e)
{