--- /dev/null
+// TortoiseMerge - a Diff/Patch program\r
+\r
+// Copyright (C) 2006,2008 - Stefan Kueng\r
+\r
+// This program is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU General Public License\r
+// as published by the Free Software Foundation; either version 2\r
+// of the License, or (at your option) any later version.\r
+\r
+// This program is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+\r
+// You should have received a copy of the GNU General Public License\r
+// along with this program; if not, write to the Free Software Foundation,\r
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
+//\r
+#include "StdAfx.h"\r
+#include ".\tempfiles.h"\r
+\r
+CTempFiles::CTempFiles(void)\r
+{\r
+}\r
+\r
+CTempFiles::~CTempFiles(void)\r
+{\r
+ for (int i=0; i<m_arTempFileList.GetCount(); i++)\r
+ {\r
+ DeleteFile(m_arTempFileList.GetAt(i));\r
+ }\r
+}\r
+\r
+CString CTempFiles::GetTempFilePath()\r
+{\r
+ DWORD len = GetTempPath(0, NULL);\r
+ TCHAR * path = new TCHAR[len+1];\r
+ TCHAR * tempF = new TCHAR[len+100];\r
+ GetTempPath (len+1, path);\r
+ GetTempFileName (path, TEXT("tsm"), 0, tempF);\r
+ CString tempfile = CString(tempF);\r
+ delete [] path;\r
+ delete [] tempF;\r
+ m_arTempFileList.Add(tempfile);\r
+ return tempfile;\r
+}\r