core: local_dir moved to config file

- ~/.sat.conf added to potential config file location
- removed useless profile param from getConfig
This commit is contained in:
Goffi 2011-06-18 17:56:59 +02:00
commit 7f1a741caa
2 changed files with 25 additions and 24 deletions

View file

@ -338,7 +338,7 @@ class MailboxUser:
self.profile=profile
self.maildir=_maildir
profile_path = self.maildir._getProfilePath(profile)
full_profile_path = os.path.join(os.path.expanduser(self.maildir.host.get_const('local_dir')),profile_path)
full_profile_path = os.path.join(self.maildir.host.memory.getConfig('','local_dir'), profile_path)
if not os.path.exists(full_profile_path):
os.makedirs(full_profile_path,0700)
mailbox_path = os.path.join(full_profile_path, MAILDIR_PATH)

View file

@ -41,7 +41,7 @@ try:
except ImportError:
from wokkel.subprotocols import XMPPHandler
AVATAR_PATH = "/avatars"
AVATAR_PATH = "avatars"
IQ_GET = '/iq[@type="get"]'
NS_VCARD = 'vcard-temp'
@ -67,7 +67,7 @@ class XEP_0054():
def __init__(self, host):
info(_("Plugin XEP_0054 initialization"))
self.host = host
self.avatar_path = os.path.expanduser(self.host.get_const('local_dir') + AVATAR_PATH)
self.avatar_path = os.path.join(self.host.memory.getConfig('', 'local_dir'), AVATAR_PATH)
self.vcard_cache = host.memory.getPrivate("vcard_cache") or {} #used to store nicknames and avatar, key = jid
if not os.path.exists(self.avatar_path):
os.makedirs(self.avatar_path)