OSDN Git Service

Solved [ 494865 ] Diff.txt left in startup dir
authorChristian List <list1974@hotmail.com>
Tue, 10 Dec 2002 21:16:47 +0000 (21:16 +0000)
committerChristian List <list1974@hotmail.com>
Tue, 10 Dec 2002 21:16:47 +0000 (21:16 +0000)
It will now be written in the users temp dir

Src/MergeDoc.cpp

index 281aaca..4ea458e 100644 (file)
@@ -294,7 +294,10 @@ BOOL CMergeDoc::Rescan()
                        script = diff_2_files (inf, depth, &diff_flag);
 
                        // throw the diff into a temp file
-                       CString path = GetModulePath(NULL) + _T("\\Diff.txt");
+                       char lpBuffer[MAX_PATH];       // path buffer
+                       GetTempPath(MAX_PATH,lpBuffer);         // get path to Temp folder
+                       CString path = CString(lpBuffer) + _T("Diff.txt");
+
                        outfile = fopen(path, "w+");
                        if (outfile != NULL)
                        {