mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +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.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.Collections;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import ru.gravit.launcher.LauncherAPI;
|
||||
import ru.gravit.utils.helper.IOHelper;
|
||||
|
@ -148,8 +143,21 @@ public Diff diff(HashedDir other, FileNameMatcher matcher) {
|
|||
return new Diff(mismatch, extra);
|
||||
}
|
||||
public void pushHashedFile(String name, HashedFile file)
|
||||
{
|
||||
map.put(name,file);
|
||||
{ //TODO: NOT WORKED
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue