mirror of
https://github.com/revanced/Apktool.git
synced 2024-11-19 10:59:28 +01:00
Merge pull request #1567 from iBotPeaches/windows_build
Detect root file path on windows vs others
This commit is contained in:
commit
e93ae011a8
@ -23,6 +23,7 @@ import brut.common.TraversalUnknownFileException;
|
|||||||
import brut.directory.ExtFile;
|
import brut.directory.ExtFile;
|
||||||
import brut.util.BrutIO;
|
import brut.util.BrutIO;
|
||||||
import brut.util.OS;
|
import brut.util.OS;
|
||||||
|
import brut.util.OSDetection;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -59,7 +60,8 @@ public class UnknownDirectoryTraversalTest {
|
|||||||
|
|
||||||
@Test(expected = RootUnknownFileException.class)
|
@Test(expected = RootUnknownFileException.class)
|
||||||
public void invalidRootFileTest() throws IOException, BrutException {
|
public void invalidRootFileTest() throws IOException, BrutException {
|
||||||
BrutIO.sanitizeUnknownFile(sTmpDir, "/file");
|
String rootLocation = OSDetection.isWindows() ? "C:/" : File.separator;
|
||||||
|
BrutIO.sanitizeUnknownFile(sTmpDir, rootLocation + "file");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = InvalidUnknownFileException.class)
|
@Test(expected = InvalidUnknownFileException.class)
|
||||||
|
Loading…
Reference in New Issue
Block a user