mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #12820 from birarda/bug/store-serverless-with-tilde
RC66 - move file ~ expansion from AddressManager to DomainHandler
This commit is contained in:
commit
02422ba538
2 changed files with 10 additions and 5 deletions
|
@ -22,7 +22,6 @@
|
|||
#include <NumericalConstants.h>
|
||||
#include <SettingHandle.h>
|
||||
#include <UUID.h>
|
||||
#include <PathUtils.h>
|
||||
|
||||
#include "AddressManager.h"
|
||||
#include "NodeList.h"
|
||||
|
@ -311,8 +310,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
// lookupUrl.scheme() == URL_SCHEME_HTTPS ||
|
||||
_previousLookup.clear();
|
||||
_shareablePlaceName.clear();
|
||||
QUrl domainURL = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
||||
setDomainInfo(domainURL, trigger);
|
||||
setDomainInfo(lookupUrl, trigger);
|
||||
emit lookupResultsFinished();
|
||||
handlePath(DOMAIN_SPAWNING_POINT, LookupTrigger::Internal, false);
|
||||
return true;
|
||||
|
|
|
@ -9,8 +9,12 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "DomainHandler.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <PathUtils.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QDataStream>
|
||||
|
||||
|
@ -25,8 +29,6 @@
|
|||
#include "UserActivityLogger.h"
|
||||
#include "NetworkLogging.h"
|
||||
|
||||
#include "DomainHandler.h"
|
||||
|
||||
DomainHandler::DomainHandler(QObject* parent) :
|
||||
QObject(parent),
|
||||
_sockAddr(HifiSockAddr(QHostAddress::Null, DEFAULT_DOMAIN_SERVER_PORT)),
|
||||
|
@ -157,6 +159,11 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
|
|||
|
||||
if (domainURL.scheme() != URL_SCHEME_HIFI) {
|
||||
_sockAddr.clear();
|
||||
|
||||
// if this is a file URL we need to see if it has a ~ for us to expand
|
||||
if (domainURL.scheme() == URL_SCHEME_FILE) {
|
||||
domainURL = PathUtils::expandToLocalDataAbsolutePath(domainURL);
|
||||
}
|
||||
}
|
||||
|
||||
if (_domainURL != domainURL || _sockAddr.getPort() != domainURL.port()) {
|
||||
|
|
Loading…
Reference in a new issue