1
0
Fork 0
forked from len0rd/rockbox

Fix extracting libmisc.so

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28754 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-12-06 22:28:18 +00:00
parent 7a9fd0baae
commit ed61439b9c

View file

@ -151,7 +151,8 @@ public class RockboxService extends Service
{ {
public void run() public void run()
{ {
File rockboxDir = new File("/data/data/org.rockbox/app_rockbox/rockbox/"); String rockboxDirPath = "/data/data/org.rockbox/app_rockbox/rockbox";
File rockboxDir = new File(rockboxDirPath);
/* the following block unzips libmisc.so, which contains the files /* the following block unzips libmisc.so, which contains the files
* we ship, such as themes. It's needed to put it into a .so file * we ship, such as themes. It's needed to put it into a .so file
@ -174,7 +175,11 @@ public class RockboxService extends Service
while(e.hasMoreElements()) while(e.hasMoreElements())
{ {
ZipEntry entry = (ZipEntry) e.nextElement(); ZipEntry entry = (ZipEntry) e.nextElement();
File file = new File(entry.getName()); File file;
/* strip off /.rockbox when extracting */
String fileName = entry.getName();
int slashIndex = fileName.indexOf('/', 1);
file = new File(rockboxDirPath + fileName.substring(slashIndex));
if (!entry.isDirectory()) if (!entry.isDirectory())
{ {