mirror of
https://github.com/libretro/RetroArch
synced 2025-02-05 15:40:04 +00:00
DetectCoreDirectoryFragment: Fix indentation
Also make a class function private.
This commit is contained in:
parent
a20ad7d88b
commit
0300d7d840
@ -77,14 +77,14 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
|
|||||||
/**
|
/**
|
||||||
* Returns everything after the last ‘.’ of the given file name or path.
|
* 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('.');
|
int i = filePath.lastIndexOf('.');
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
return filePath.substring(i+1).toLowerCase();
|
return filePath.substring(i+1).toLowerCase();
|
||||||
return ""; // No extension
|
return ""; // No extension
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
@ -188,24 +188,24 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ZipFile zipFile = new ZipFile(chosenFile);
|
ZipFile zipFile = new ZipFile(chosenFile);
|
||||||
|
|
||||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
|
||||||
|
|
||||||
// Try to handle the case of small text files bundles with content.
|
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||||
long largestEntry = Long.MIN_VALUE;
|
|
||||||
|
|
||||||
while (entries.hasMoreElements())
|
// Try to handle the case of small text files bundles with content.
|
||||||
{
|
long largestEntry = Long.MIN_VALUE;
|
||||||
ZipEntry zipEntry = entries.nextElement();
|
|
||||||
if (zipEntry.getCompressedSize() >= largestEntry)
|
while (entries.hasMoreElements())
|
||||||
{
|
{
|
||||||
largestEntry = zipEntry.getCompressedSize();
|
ZipEntry zipEntry = entries.nextElement();
|
||||||
fileExt = getFileExt(zipEntry.getName());
|
if (zipEntry.getCompressedSize() >= largestEntry)
|
||||||
}
|
{
|
||||||
}
|
largestEntry = zipEntry.getCompressedSize();
|
||||||
|
fileExt = getFileExt(zipEntry.getName());
|
||||||
zipFile.close();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
zipFile.close();
|
||||||
}
|
}
|
||||||
catch(IOException e)
|
catch(IOException e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user