forked from qt-creator/qt-creator
FilePath: Use isSameDevice
Some places compared the scheme and host of a filepath to decide whether its the same device. This is incorrect and leads to false negatives. isSameDevice is the correct way to decide whether two paths are from the same device. Fixes: QTCREATORBUG-29474 Change-Id: Iced8f434dadb931f6595f47f95647b341c48d3aa Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1204,7 +1204,7 @@ FilePath Process::workingDirectory() const
|
||||
void Process::setWorkingDirectory(const FilePath &dir)
|
||||
{
|
||||
if (dir.needsDevice() && d->m_setup.m_commandLine.executable().needsDevice()) {
|
||||
QTC_CHECK(dir.host() == d->m_setup.m_commandLine.executable().host());
|
||||
QTC_CHECK(dir.isSameDevice(d->m_setup.m_commandLine.executable()));
|
||||
}
|
||||
d->m_setup.m_workingDirectory = dir;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user