From 85edbc356eaa24c52e5af597e344c076c5a9bf61 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Thu, 7 Nov 2024 01:39:56 -0500 Subject: [PATCH] Fix parameter detection on Windows (#117) --- python/dftd3/parameters.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/dftd3/parameters.py b/python/dftd3/parameters.py index fe567d26..169b1309 100644 --- a/python/dftd3/parameters.py +++ b/python/dftd3/parameters.py @@ -53,7 +53,12 @@ def get_data_file_name(base_name: str = "parameters.toml") -> str: dirname(__file__), "..", "..", "..", "..", "share", "s-dftd3", base_name ) if not exists(data_file): - data_file = join(dirname(__file__), base_name) + # for Windows install layout + data_file = join( + dirname(__file__), "..", "..", "..", "Library", "share", "s-dftd3", base_name + ) + if not exists(data_file): + data_file = join(dirname(__file__), base_name) return data_file