forked from qt-creator/qt-creator
Git: Fix remote detection for local remotes starting with "file://"
Task-number: QTCREATORBUG-20618 Change-Id: I21cddf88b64fa7a6acdc92228142976284ef8942 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
11ffd3d702
commit
495356ce9d
@@ -3371,10 +3371,10 @@ GitRemote::GitRemote(const QString &url)
|
||||
|
||||
// Check for local remotes (refer to the root or relative path)
|
||||
// On Windows, local paths typically starts with <drive>:
|
||||
if (url.startsWith('/') || url.startsWith('.')
|
||||
if (url.startsWith("file://") || url.startsWith('/') || url.startsWith('.')
|
||||
|| (HostOsInfo::isWindowsHost() && url[1] == ':')) {
|
||||
protocol = "file";
|
||||
path = QDir::fromNativeSeparators(url);
|
||||
path = QDir::fromNativeSeparators(url.startsWith("file://") ? url.mid(7) : url);
|
||||
isValid = QDir(path).exists() || QDir(path + ".git").exists();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user