mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 14:15:39 +02:00
fix extracting default avatar bookmarks from resources
This commit is contained in:
parent
5990d2725a
commit
4db346167d
1 changed files with 8 additions and 2 deletions
|
@ -95,8 +95,14 @@ void addAvatarEntities(const QVariantList& avatarEntities) {
|
|||
AvatarBookmarks::AvatarBookmarks() {
|
||||
_bookmarksFilename = PathUtils::getAppDataPath() + "/" + AVATARBOOKMARKS_FILENAME;
|
||||
if(!QFile::exists(_bookmarksFilename)) {
|
||||
auto defaultBookmarksFilename = PathUtils::resourcesUrl(QString("avatar/bookmarks") + "/" + AVATARBOOKMARKS_FILENAME).toLocalFile();
|
||||
QFile::copy(defaultBookmarksFilename, _bookmarksFilename);
|
||||
auto defaultBookmarksFilename = PathUtils::resourcesPath() + QString("avatar/bookmarks") + "/" + AVATARBOOKMARKS_FILENAME;
|
||||
if (!QFile::exists(defaultBookmarksFilename)) {
|
||||
qDebug() << defaultBookmarksFilename << "doesn't exist!";
|
||||
}
|
||||
|
||||
if (!QFile::copy(defaultBookmarksFilename, _bookmarksFilename)) {
|
||||
qDebug() << "failed to copy" << defaultBookmarksFilename << "to" << _bookmarksFilename;
|
||||
}
|
||||
}
|
||||
readFromFile();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue