Fix custom download path in Mac App Store build.

Fixes #5903.
This commit is contained in:
John Preston 2019-04-13 19:49:13 +04:00
parent 0023fdc707
commit edc8c23772
2 changed files with 2 additions and 2 deletions

View File

@ -340,7 +340,7 @@ void start(not_null<Core::Launcher*> launcher) {
// or from the "-workdir" command line argument.
cForceWorkingDir(cWorkingDir());
} else {
#ifdef _DEBUG
#if defined _DEBUG && !defined OS_MAC_STORE
cForceWorkingDir(cExeDir());
#else // _DEBUG
cForceWorkingDir(psAppDataPath());

View File

@ -471,7 +471,7 @@ void objc_downloadPathEnableAccess(const QByteArray &bookmark) {
if (_downloadPathUrl) {
[_downloadPathUrl stopAccessingSecurityScopedResource];
}
_downloadPathUrl = url;
_downloadPathUrl = [url retain];
Global::SetDownloadPath(NS2QString([_downloadPathUrl path]) + '/');
if (isStale) {