Menu

Commit [r97]  Maximize  Restore  History

* Delete the temp file before writing to it to make sure that when we read it later it doesn't contain old or illegal data.

* Save the name of the SVNParentPathList 'project' into a variable since we can't use the data from the iterator: the iterator is invalid when we need the project name.

tortoisesvn 2007-04-27

changed /trunk/src/HiddenWindow.cpp
/trunk/src/HiddenWindow.cpp Diff Switch to side-by-side view
--- a/trunk/src/HiddenWindow.cpp
+++ b/trunk/src/HiddenWindow.cpp
@@ -408,6 +408,8 @@
 				wstring tempfile = CTempFiles::Instance().GetTempFilePath(true);
 				CCallback * callback = new CCallback;
 				callback->SetAuthData(it->second.username, it->second.password);
+				DeleteFile(tempfile.c_str());
+				wstring projName = it->second.name;
 				if (URLDownloadToFile(NULL, it->first.c_str(), tempfile.c_str(), 0, callback) == S_OK)
 				{
 					// we got a web page! But we can't be sure that it's the page from SVNParentPath.
@@ -545,7 +547,7 @@
 						{
 							it = pUrlInfoReadOnly->begin();
 							TCHAR popupTitle[1024] = {0};
-							_stprintf_s(popupTitle, 1024, _T("%s\nhas %d new projects"), it->second.name.c_str(), nCountNewEntries);
+							_stprintf_s(popupTitle, 1024, _T("%s\nhas %d new projects"), projName.c_str(), nCountNewEntries);
 							popupData data;
 							data.sText = popupText;
 							data.sTitle = wstring(popupTitle);
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.