OSDN Git Service

Fix Issue 91: clone dialog generates bad directory name based on URL, ignores overrid
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / CloneDlg.cpp
index 77b712d..f391552 100644 (file)
@@ -202,6 +202,11 @@ void CCloneDlg::OnCbnEditchangeUrlcombo()
        this->UpdateData();\r
        CString url;\r
        m_URLCombo.GetWindowText(url);\r
+       if(m_OldURL == url )\r
+               return;\r
+\r
+       m_OldURL=url;\r
+\r
        //if(url.IsEmpty())\r
        //      return;\r
 \r
@@ -211,8 +216,14 @@ void CCloneDlg::OnCbnEditchangeUrlcombo()
        url.Replace(_T('\\'),_T('/'));\r
        int start=url.ReverseFind(_T('/'));\r
        if(start<0)\r
-               start = 0;\r
+       {\r
+               start = url.ReverseFind(_T(':'));\r
+               if(start <0)\r
+                       start = url.ReverseFind(_T('@'));\r
 \r
+               if(start<0)\r
+                       start = 0;\r
+       }\r
        CString temp;\r
        temp=url.Mid(start+1);\r
        \r