mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] HashedDir NPE
This commit is contained in:
parent
7ab7c29fe4
commit
77b5188b52
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,7 @@ public void remove(String name) {
|
||||||
map.remove(name);
|
map.remove(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void removeR(String name) {
|
public void removeR(String name) {
|
||||||
LinkedList<String> dirs = new LinkedList<>();
|
LinkedList<String> dirs = new LinkedList<>();
|
||||||
StringTokenizer t = new StringTokenizer(name, "/");
|
StringTokenizer t = new StringTokenizer(name, "/");
|
||||||
|
@ -117,6 +118,9 @@ public FindRecursiveResult findRecursive(String path) {
|
||||||
if (e == null && !t.hasMoreTokens()) {
|
if (e == null && !t.hasMoreTokens()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (e == null) {
|
||||||
|
throw new RuntimeException(String.format("Directory %s not found", name));
|
||||||
|
}
|
||||||
if (e.getType() == Type.DIR) {
|
if (e.getType() == Type.DIR) {
|
||||||
if (!t.hasMoreTokens()) {
|
if (!t.hasMoreTokens()) {
|
||||||
entry = e;
|
entry = e;
|
||||||
|
|
Loading…
Reference in a new issue