mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 14:44:26 +02:00
fix nio2 windows problem - funorpain
This commit is contained in:
parent
0949a6c50f
commit
259ff5ef01
@ -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
|
// 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
|
// 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());
|
Path newFile = Paths.get(insert.getAbsolutePath());
|
||||||
Files.copy(newFile,dest, StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(newFile,dest, StandardCopyOption.REPLACE_EXISTING);
|
||||||
fs.close();
|
fs.close();
|
||||||
@ -598,7 +598,7 @@ public class Androlib {
|
|||||||
try(FileSystem fs = FileSystems.newFileSystem(apkFileSystem, zip_properties)) {
|
try(FileSystem fs = FileSystems.newFileSystem(apkFileSystem, zip_properties)) {
|
||||||
|
|
||||||
Path root = fs.getPath("/");
|
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();
|
Path parent = dest.normalize();
|
||||||
|
|
||||||
// check for folder existing in apkFileSystem
|
// check for folder existing in apkFileSystem
|
||||||
|
Loading…
x
Reference in New Issue
Block a user