summaryrefslogtreecommitdiff
path: root/android/src
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-12-06 22:28:18 +0000
committerThomas Martitz <kugel@rockbox.org>2010-12-06 22:28:18 +0000
commited61439b9cc99e299708a637bc30ea8c0cd2d40a (patch)
tree46497bba6e670e381416a4535eb761cd7a21b683 /android/src
parent7a9fd0baae1ea39fadb982841b34313db06825c8 (diff)
Fix extracting libmisc.so
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28754 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/src')
-rw-r--r--android/src/org/rockbox/RockboxService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/android/src/org/rockbox/RockboxService.java b/android/src/org/rockbox/RockboxService.java
index 0737bf88ce..033ece320c 100644
--- a/android/src/org/rockbox/RockboxService.java
+++ b/android/src/org/rockbox/RockboxService.java
@@ -151,7 +151,8 @@ public class RockboxService extends Service
{
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
* 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())
{
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())
{