From 259ff5ef0110ab77f8ec7f859e57cad5dbb41f83 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 8 Dec 2013 16:48:59 -0600 Subject: [PATCH] fix nio2 windows problem - funorpain --- .../apktool-lib/src/main/java/brut/androlib/Androlib.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java index b9698242..5460bae1 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java @@ -585,7 +585,7 @@ public class Androlib { // in order to get the path relative to the zip, we strip off the absolute path, minus what we // already have in the zip. thus /var/files/apktool/apk/unknown/folder/file => /folder/file - Path dest = fs.getPath(root.toString() + insert.getAbsolutePath().replace(location.toString(),"")); + Path dest = fs.getPath(root.toString(), insert.getAbsolutePath().replace(location.toString(),"")); Path newFile = Paths.get(insert.getAbsolutePath()); Files.copy(newFile,dest, StandardCopyOption.REPLACE_EXISTING); fs.close(); @@ -598,7 +598,7 @@ public class Androlib { try(FileSystem fs = FileSystems.newFileSystem(apkFileSystem, zip_properties)) { Path root = fs.getPath("/"); - Path dest = fs.getPath(root.toString() + insert.getAbsolutePath().replace(location.toString(),"")); + Path dest = fs.getPath(root.toString(), insert.getAbsolutePath().replace(location.toString(),"")); Path parent = dest.normalize(); // check for folder existing in apkFileSystem