Fixed presets directory path-related error with preset() function

pull/104/head
marceloprates 2022-11-08 13:59:28 -03:00
rodzic c70f32a8e6
commit e11b7e6289
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -772,11 +772,7 @@ def presets():
def preset(name):
base_path = os.path.abspath(os.path.join(
os.path.dirname(prettymaps.__file__),
os.path.pardir
))
with open(os.path.join(base_path, "presets", f"{name}.json"), "r") as f:
with open(os.path.join(presets_directory(), f"{name}.json"), "r") as f:
# Load params from JSON file
params = json.load(f)
return Preset(params)