try using app-local-data path for /~/

This commit is contained in:
Seth Alves 2018-02-23 13:58:23 -08:00
parent 3ee979fc34
commit 1e49dc5ca2
2 changed files with 4 additions and 2 deletions

View file

@ -1164,6 +1164,7 @@ void MyAvatar::loadData() {
updateAvatarEntity(entityID, properties);
}
settings.endArray();
qDebug() << "QQQQ saved " << avatarEntityCount << " avatar entities";
if (avatarEntityCount == 0) {
// HACK: manually remove empty 'avatarEntityData' else legacy data may persist in settings file
settings.remove("avatarEntityData");

View file

@ -81,7 +81,7 @@ const QString& PathUtils::resourcesPath() {
#else
staticResourcePath = ":/";
#endif
#if !defined(Q_OS_ANDROID) && defined(DEV_BUILD)
if (USE_SOURCE_TREE_RESOURCES()) {
// For dev builds, optionally load content from the Git source tree
@ -124,8 +124,9 @@ QUrl PathUtils::expandToAppAbsolutePath(const QUrl& fileUrl) {
QUrl url = fileUrl;
QString path = fileUrl.path();
if (path.startsWith("/~/")) {
path.replace(0, 3, resourcesUrl());
path.replace(0, 3, getAppLocalDataPath());
url = QUrl(path);
qDebug() << "QQQQ expandToAppAbsolutePath: " << fileUrl << url;
}
return url;
}