diff --git a/Linux/Bungloo.py b/Linux/Bungloo.py index 43a9920..b8f6e75 100755 --- a/Linux/Bungloo.py +++ b/Linux/Bungloo.py @@ -4,6 +4,8 @@ import os, sys, pickle, subprocess from PyQt4 import QtCore, QtGui, QtWebKit import Windows, Helper +import shutil + class Bungloo: def __init__(self): @@ -64,10 +66,16 @@ class Controller(QtCore.QObject): QtCore.QObject.__init__(self) self.app = app - if not os.path.exists(os.path.expanduser("~/.bungloo/")): - os.makedirs(os.path.expanduser("~/.bungloo/")) + oldpath = os.path.expanduser('~/.bungloo/') + if os.path.isdir(oldpath): + shutil.copytree(oldpath, os.path.expanduser('~/.config/bungloo/')) + shutil.rmtree(os.path.expanduser('~/.bungloo/')) + + if not os.path.exists(os.path.expanduser("~/.config/bungloo/")): + os.makedirs(os.path.expanduser("~/.config/bungloo/")) + + self.config_path = os.path.expanduser('~/.config/bungloo/bungloo.cfg') - self.config_path = os.path.expanduser('~/.bungloo/bungloo.cfg') if os.access(self.config_path, os.R_OK): with open(self.config_path, 'r') as f: self.config = pickle.load(f)