From 0b0a6f3657718f757b9ae677a1812f2a56e3505a Mon Sep 17 00:00:00 2001 From: Amir Taaki Date: Sun, 8 Jul 2012 11:13:11 +0100 Subject: [PATCH] try to detect data/style.css otherwise fallback to arch-indep data dir. --- lib/gui_lite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gui_lite.py b/lib/gui_lite.py index 556a683b2..d86e9e0a6 100644 --- a/lib/gui_lite.py +++ b/lib/gui_lite.py @@ -37,9 +37,9 @@ def resize_line_edit_width(line_edit, text_input): line_edit.setMinimumWidth(metrics.width(text_input)) def cd_data_dir(): - try: - data_dir = os.environ["ELECTRUM_DATA_PATH"] - except KeyError: + if os.path.exists(os.path.join("data", "style.css")): + data_dir = os.path.join(".", "data") + else: data_dir = appdata_dir() QDir.setCurrent(data_dir)