mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 16:20:39 +00:00
(Android) Build fix
This commit is contained in:
parent
2c7c24b452
commit
c49985ce90
@ -1,6 +1,7 @@
|
|||||||
package com.retroarch.browser.dirfragment;
|
package com.retroarch.browser.dirfragment;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -182,10 +183,13 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
|
|||||||
// Attempt to get the file extension.
|
// Attempt to get the file extension.
|
||||||
String fileExt = getFileExt(filePath);
|
String fileExt = getFileExt(filePath);
|
||||||
|
|
||||||
if (fileExt.equals(“zip”))
|
if (fileExt.equals("zip"))
|
||||||
{
|
{
|
||||||
ZipFile zipFile = new ZipFile(chosenFile);
|
try
|
||||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
{
|
||||||
|
ZipFile zipFile = new ZipFile(chosenFile);
|
||||||
|
|
||||||
|
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||||
|
|
||||||
// Try to handle the case of small text files bundles with ROMs.
|
// Try to handle the case of small text files bundles with ROMs.
|
||||||
long largestEntry = Long.MIN_VALUE;
|
long largestEntry = Long.MIN_VALUE;
|
||||||
@ -193,12 +197,18 @@ public final class DetectCoreDirectoryFragment extends DirectoryFragment
|
|||||||
while (entries.hasMoreElements())
|
while (entries.hasMoreElements())
|
||||||
{
|
{
|
||||||
ZipEntry zipEntry = entries.nextElement();
|
ZipEntry zipEntry = entries.nextElement();
|
||||||
if (zipEntry.getCompressedSize()) >= largestEntry)
|
if (zipEntry.getCompressedSize() >= largestEntry)
|
||||||
{
|
{
|
||||||
largestEntry = zipEntry.getCompressedSize();
|
largestEntry = zipEntry.getCompressedSize();
|
||||||
fileExt = getFileExt(zipEntry.getName());
|
fileExt = getFileExt(zipEntry.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enumerate the cores and check for the extension
|
// Enumerate the cores and check for the extension
|
||||||
|
Loading…
x
Reference in New Issue
Block a user