#include "Git.h"\r
#include "DirFileEnum.h"\r
#include "ShellUpdater.h"\r
+#include "AppUtils.h"\r
\r
bool ImportPatchCommand::Execute()\r
{\r
CString cmd;\r
CString output;\r
\r
+ if(!this->orgCmdLinePath.IsAdminDir())\r
+ {\r
+ CString str=CAppUtils::ChooseRepository((CString*)&orgCmdLinePath.GetWinPathString());\r
+ CTGitPath path;\r
+ path.SetFromWin(str);\r
+ \r
+ if(!path.HasAdminDir())\r
+ {\r
+ CString format;\r
+ format.LoadString(IDS_ERR_NOT_REPOSITORY);\r
+ CString err;\r
+ err.Format(format,str);\r
+ CMessageBox::Show(NULL,err,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
+ return FALSE;\r
+ }\r
+ g_Git.m_CurrentDir=str;\r
+ }\r
+\r
for(int i=0;i<this->pathList.GetCount();i++)\r
{\r
if(!pathList[i].IsDirectory())\r