Author: dgorbachev
Date: Mon Nov 9 16:34:18 2009
New Revision: 44049
URL:
http://svn.reactos.org/svn/reactos?rev=44049&view=rev
Log:
Simple optimization in RApps. Patch by Love Nystrom. Bug #4952.
Modified:
trunk/reactos/base/applications/rapps/loaddlg.c
Modified: trunk/reactos/base/applications/rapps/loaddlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
==============================================================================
--- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Mon Nov 9 16:34:18 2009
@@ -1,6 +1,6 @@
/* PROJECT: ReactOS Applications Manager
* LICENSE: GPL - See COPYING in the top level directory
- * FILE: base/applications/rapps/download.c
+ * FILE: base/applications/rapps/loaddlg.c
* PURPOSE: Displaying a download dialog
* COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers)
* Copyright 2004 Mike McCormack (for CodeWeavers)
@@ -218,7 +218,7 @@
STARTUPINFOW si;
PROCESS_INFORMATION pi;
HWND Dlg = (HWND) Context;
- DWORD r;
+ DWORD r, len;
BOOL bCancelled = FALSE;
BOOL bTempfile = FALSE;
BOOL bCab = FALSE;
@@ -227,12 +227,13 @@
p = wcsrchr(AppInfo->szUrlDownload, L'/');
if (!p) goto end;
- if (wcslen(AppInfo->szUrlDownload) > 4)
- {
- if (AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 4] ==
'.' &&
- AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 3] ==
'c' &&
- AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 2] ==
'a' &&
- AppInfo->szUrlDownload[wcslen(AppInfo->szUrlDownload) - 1] ==
'b')
+ len = wcslen(AppInfo->szUrlDownload);
+ if (len > 4)
+ {
+ if (AppInfo->szUrlDownload[len - 4] == '.' &&
+ AppInfo->szUrlDownload[len - 3] == 'c' &&
+ AppInfo->szUrlDownload[len - 2] == 'a' &&
+ AppInfo->szUrlDownload[len - 1] == 'b')
{
bCab = TRUE;
if (!GetCurrentDirectoryW(MAX_PATH, path))