diff options
-rw-r--r-- | android/src/org/rockbox/RockboxService.java | 9 |
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 | |||
151 | { | 151 | { |
152 | public void run() | 152 | public void run() |
153 | { | 153 | { |
154 | File rockboxDir = new File("/data/data/org.rockbox/app_rockbox/rockbox/"); | 154 | String rockboxDirPath = "/data/data/org.rockbox/app_rockbox/rockbox"; |
155 | File rockboxDir = new File(rockboxDirPath); | ||
155 | 156 | ||
156 | /* the following block unzips libmisc.so, which contains the files | 157 | /* the following block unzips libmisc.so, which contains the files |
157 | * we ship, such as themes. It's needed to put it into a .so file | 158 | * we ship, such as themes. It's needed to put it into a .so file |
@@ -174,7 +175,11 @@ public class RockboxService extends Service | |||
174 | while(e.hasMoreElements()) | 175 | while(e.hasMoreElements()) |
175 | { | 176 | { |
176 | ZipEntry entry = (ZipEntry) e.nextElement(); | 177 | ZipEntry entry = (ZipEntry) e.nextElement(); |
177 | File file = new File(entry.getName()); | 178 | File file; |
179 | /* strip off /.rockbox when extracting */ | ||
180 | String fileName = entry.getName(); | ||
181 | int slashIndex = fileName.indexOf('/', 1); | ||
182 | file = new File(rockboxDirPath + fileName.substring(slashIndex)); | ||
178 | 183 | ||
179 | if (!entry.isDirectory()) | 184 | if (!entry.isDirectory()) |
180 | { | 185 | { |