mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 00:59:44 +03:00
Опциональные моды начало фикса
This commit is contained in:
parent
77978b0f74
commit
b32a613fd5
1 changed files with 16 additions and 8 deletions
|
@ -5,13 +5,8 @@
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.SimpleFileVisitor;
|
import java.nio.file.SimpleFileVisitor;
|
||||||
import java.nio.file.attribute.BasicFileAttributes;
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
import java.util.Collections;
|
import java.util.*;
|
||||||
import java.util.Deque;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
|
@ -148,8 +143,21 @@ public Diff diff(HashedDir other, FileNameMatcher matcher) {
|
||||||
return new Diff(mismatch, extra);
|
return new Diff(mismatch, extra);
|
||||||
}
|
}
|
||||||
public void pushHashedFile(String name, HashedFile file)
|
public void pushHashedFile(String name, HashedFile file)
|
||||||
{
|
{ //TODO: NOT WORKED
|
||||||
map.put(name,file);
|
Stack<String> dir_stack = new Stack<>();
|
||||||
|
StringTokenizer st = new StringTokenizer(name,"/");
|
||||||
|
while(st.hasMoreTokens())
|
||||||
|
{
|
||||||
|
dir_stack.push(st.nextToken());
|
||||||
|
}
|
||||||
|
HashedDir dir;
|
||||||
|
Map<String,HashedEntry> current = map;
|
||||||
|
while(dir_stack.size() != 1)
|
||||||
|
{
|
||||||
|
dir = (HashedDir) current.get(dir_stack.pop());
|
||||||
|
current = dir.map;
|
||||||
|
}
|
||||||
|
current.put(dir_stack.pop(),file);
|
||||||
}
|
}
|
||||||
public void remove(String name)
|
public void remove(String name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue