From 96ef5089fc7064d0ceb88b52022d895a043c2a61 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 1 Nov 2016 16:40:50 -0400 Subject: [PATCH] fix data_dir problem in UIManager --- lbrynet/lbrynet_daemon/UIManager.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lbrynet/lbrynet_daemon/UIManager.py b/lbrynet/lbrynet_daemon/UIManager.py index 2169bdaea..19740a6e2 100644 --- a/lbrynet/lbrynet_daemon/UIManager.py +++ b/lbrynet/lbrynet_daemon/UIManager.py @@ -1,7 +1,6 @@ import os import logging import shutil -import sys import json from urllib2 import urlopen @@ -13,7 +12,6 @@ from lbrynet.lbrynet_daemon.Resources import NoCacheStaticFile from lbrynet import __version__ as lbrynet_version from lbryum.version import LBRYUM_VERSION as lbryum_version from zipfile import ZipFile -from appdirs import user_data_dir log = logging.getLogger(__name__) @@ -21,17 +19,10 @@ log = logging.getLogger(__name__) class UIManager(object): def __init__(self, root): - if sys.platform != "darwin": - self.data_dir = os.path.join(os.path.expanduser("~"), '.lbrynet') - else: - self.data_dir = user_data_dir("LBRY") - - self.ui_root = os.path.join(self.data_dir, "lbry-ui") + self.ui_root = os.path.join(settings.data_dir, "lbry-ui") self.active_dir = os.path.join(self.ui_root, "active") self.update_dir = os.path.join(self.ui_root, "update") - if not os.path.isdir(self.data_dir): - os.mkdir(self.data_dir) if not os.path.isdir(self.ui_root): os.mkdir(self.ui_root) if not os.path.isdir(self.active_dir):