OSDN Git Service

Fix Issue 91: clone dialog generates bad directory name based on URL, ignores overrid
authorFrank Li <lznuaa@gmail.com>
Sun, 31 May 2009 01:39:00 +0000 (09:39 +0800)
committerFrank Li <lznuaa@gmail.com>
Sun, 31 May 2009 01:39:00 +0000 (09:39 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/CloneDlg.cpp
src/TortoiseProc/CloneDlg.h

index 77b712d..f391552 100644 (file)
@@ -202,6 +202,11 @@ void CCloneDlg::OnCbnEditchangeUrlcombo()
        this->UpdateData();\r
        CString url;\r
        m_URLCombo.GetWindowText(url);\r
        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
        //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
        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
 \r
+               if(start<0)\r
+                       start = 0;\r
+       }\r
        CString temp;\r
        temp=url.Mid(start+1);\r
        \r
        CString temp;\r
        temp=url.Mid(start+1);\r
        \r
index 65f2eee..327399b 100644 (file)
@@ -25,6 +25,7 @@ protected:
        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
        virtual BOOL OnInitDialog();\r
        CString m_ModuleName;\r
        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
        virtual BOOL OnInitDialog();\r
        CString m_ModuleName;\r
+       CString m_OldURL;\r
 \r
        DECLARE_MESSAGE_MAP()\r
 \r
 \r
        DECLARE_MESSAGE_MAP()\r
 \r