forked from qt-creator/qt-creator
Git: Fix bad access to temporary storage
+ limit the fix to cases with HOMESHARE. Change-Id: Ic108ab49eb3b64d5e1d302466c74610acc412175 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
74ea443ebf
commit
2ee739b362
@@ -2225,10 +2225,12 @@ Environment GitClient::processEnvironment() const
|
|||||||
environment.prependOrSetPath(FilePath::fromUserInput(gitPath));
|
environment.prependOrSetPath(FilePath::fromUserInput(gitPath));
|
||||||
if (HostOsInfo::isWindowsHost() && settings().winSetHomeEnvironment.value()) {
|
if (HostOsInfo::isWindowsHost() && settings().winSetHomeEnvironment.value()) {
|
||||||
QString homePath;
|
QString homePath;
|
||||||
if (const char *homeDrive = qgetenv("HOMEDRIVE"))
|
if (qEnvironmentVariableIsEmpty("HOMESHARE")) {
|
||||||
homePath = QString::fromLocal8Bit(homeDrive) + QString::fromLocal8Bit(qgetenv("HOMEPATH"));
|
|
||||||
else
|
|
||||||
homePath = QDir::toNativeSeparators(QDir::homePath());
|
homePath = QDir::toNativeSeparators(QDir::homePath());
|
||||||
|
} else {
|
||||||
|
homePath = QString::fromLocal8Bit(qgetenv("HOMEDRIVE"))
|
||||||
|
+ QString::fromLocal8Bit(qgetenv("HOMEPATH"));
|
||||||
|
}
|
||||||
environment.set("HOME", homePath);
|
environment.set("HOME", homePath);
|
||||||
}
|
}
|
||||||
environment.set("GIT_EDITOR", m_disableEditor ? "true" : m_gitQtcEditor);
|
environment.set("GIT_EDITOR", m_disableEditor ? "true" : m_gitQtcEditor);
|
||||||
|
|||||||
Reference in New Issue
Block a user