[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Suspicious code in AppUtils

From: Dmitry <wipedout_at_yandex.ru>
Date: Fri, 21 Jan 2011 10:00:59 +0300

Hey.

Currently CAppUtils::StartExtMerge() contains the following code:

com = CPathUtils::GetAppDirectory() + _T("TortoiseMerge.exe");
if (com.IsEmpty())
{
      com = CPathUtils::GetAppDirectory();
      com += _T("TortoiseMerge.exe");
}

which looks insane. First, how could a concatenation of anything with a non-empty string literal produce an empty string? Second, even if that happens why compute and assign the very same concatenation again?

Best wishes.
Dmitry.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2699529

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-01-21 08:01:07 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.