# Copyright 2005 James Bunton <james@delx.cjb.net>
# Licensed for distribution under the GPL version 2, check COPYING for details
-from tlib import xmlw
+from twisted.words.protocols.jabber.jid import internJID
import utils
import config
if not os.path.isfile(file):
continue
file = xdb.unmangle(file).decode("utf-8")
- filej = xmlw.jid.intern(file).full()
+ filej = internJID(file).full()
if(file != filej):
file = xdb.mangle(file)
filej = xdb.mangle(filej)
if os.path.exists(pre + "avatars"):
# Remove the avatars dir that gets created when we import
# legacy/glue.py (it only contains the defaultAvatar)
- shutil.rmtree(config.spooldir + X + "avatars")
- shutil.move(pre + "avatars", config.spooldir + X + "avatars")
+ shutil.rmtree(os.path.join(config.spooldir, "avatars"))
+ shutil.move(pre + "avatars", os.path.join(config.spooldir, "avatars"))
else:
print "Could not move your cached avatars directory automatically. It is safe to delete it, the avatars will be recreated as necessary."