Always read the account name.

Create the backup directories.
This commit is contained in:
codestation
2013-12-13 09:33:46 -04:30
parent 5827c6ad0c
commit e68f01c858
2 changed files with 9 additions and 2 deletions

View File

@@ -608,9 +608,12 @@ void CmaEvent::vitaEventGetSettingInfo(vita_event_t *event, int eventId)
qDebug("Current account id: %s", settingsinfo->current_account.accountId); qDebug("Current account id: %s", settingsinfo->current_account.accountId);
QSettings settings; QSettings settings;
// Always refresh the account name
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) { if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
db->setUUID(settingsinfo->current_account.accountId); db->setUUID(settingsinfo->current_account.accountId);
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
// set the database to be updated ASAP // set the database to be updated ASAP
emit refreshDatabase(); emit refreshDatabase();
} }

View File

@@ -99,6 +99,10 @@ void CMARootObject::initObject(const QString &path)
this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid); this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid);
num_filters = 0; num_filters = 0;
} }
// create the backup directories
QDir dir(this->path);
dir.mkpath(dir.absolutePath());
} }
CMARootObject::~CMARootObject() CMARootObject::~CMARootObject()