Page MenuHomeDevCentral

D2740.id6954.diff
No OneTemporary

D2740.id6954.diff

diff --git a/src/mergedictionaries/sources/jetbrains.py b/src/mergedictionaries/sources/jetbrains.py
--- a/src/mergedictionaries/sources/jetbrains.py
+++ b/src/mergedictionaries/sources/jetbrains.py
@@ -12,8 +12,18 @@
from xml.etree import ElementTree
+DICTIONARY_FILENAMES = [
+ "cachedDictionary.xml",
+ "spellchecker-dictionary.xml"
+]
+
+
def get_configuration_path():
- return os.environ["HOME"] + "/.config/JetBrains"
+ """Find JetBrains configuration folder for Windows and UNIX systems."""
+ try:
+ return os.environ["APPDATA"] + "/JetBrains"
+ except KeyError:
+ return os.environ["HOME"] + "/.config/JetBrains"
def find_application_level_dictionaries():
@@ -24,7 +34,8 @@
return [
candidate
for candidate in [
- os.path.join(base_path, entry.name, "options", "cachedDictionary.xml")
+ os.path.join(base_path, entry.name, "options", filename)
+ for filename in DICTIONARY_FILENAMES
for entry in os.scandir(base_path)
if entry.is_dir()
]

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 16:56 (11 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315047
Default Alt Text
D2740.id6954.diff (1 KB)

Event Timeline