Skip to content

Commit 75b7713

Browse files
committed
Merge pull request #1 from yurijmi/Fixed-NullPointerExceptions-on-Windows
Fixed NullPointerExceptions on Windows
2 parents 5491f2e + 0ccd281 commit 75b7713

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/com/stericson/RootShell/containers/RootClass.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public AnnotationsFinder() throws IOException {
148148
} catch (InterruptedException e) {
149149
}
150150

151-
File rawFolder = new File("res/raw");
151+
File rawFolder = new File("res" + File.separator + "raw");
152152
if (!rawFolder.exists()) {
153153
rawFolder.mkdirs();
154154
}
@@ -157,14 +157,14 @@ public AnnotationsFinder() throws IOException {
157157
if (onWindows) {
158158
cmd = new String[]{
159159
"cmd", "/C",
160-
"dx --dex --output=res/raw/anbuild.dex "
160+
"dx --dex --output=res" + File.separator + "raw" + File.separator + "anbuild.dex "
161161
+ builtPath + File.separator + "anbuild.jar"
162162
};
163163
} else {
164164
cmd = new String[]{
165165
getPathToDx(),
166166
"--dex",
167-
"--output=res/raw/anbuild.dex",
167+
"--output=res" + File.separator + "raw" + File.separator + "anbuild.dex",
168168
builtPath + File.separator + "anbuild.jar"
169169
};
170170
}
@@ -175,11 +175,11 @@ public AnnotationsFinder() throws IOException {
175175
} catch (InterruptedException e) {
176176
}
177177
}
178-
System.out.println("All done. ::: anbuild.dex should now be in your project's res/raw/ folder :::");
178+
System.out.println("All done. ::: anbuild.dex should now be in your project's res" + File.separator + "raw" + File.separator + " folder :::");
179179
}
180180

181181
protected void lookup(File path, List<File> fileList) {
182-
String desourcedPath = path.toString().replace("src/", "");
182+
String desourcedPath = path.toString().replace("src" + File.separator, "");
183183
File[] files = path.listFiles();
184184
for (File file : files) {
185185
if (file.isDirectory()) {

0 commit comments

Comments
 (0)