OSDN Git Service

PATCH: [ 1370183 ] ShellExtension: better way to check for WinMerge executable
authorKimmo Varis <kimmov@gmail.com>
Tue, 6 Dec 2005 16:31:14 +0000 (16:31 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 6 Dec 2005 16:31:14 +0000 (16:31 +0000)
ShellExtension/WinMergeShell.cpp
Src/Changes.txt

index 60b60fd..2cb9f9f 100644 (file)
@@ -44,6 +44,8 @@
 #include "WinMergeShell.h"
 #include "RegKey.h"
 #include "coretools.h"
+#include <sys/types.h>
+#include <sys/stat.h>
 
 /// Flags for enabling and mode of extension
 #define EXT_ENABLED 0x01
@@ -387,8 +389,9 @@ BOOL CWinMergeShell::CheckExecutable(CString path)
        if (ext == _T("exe") || ext == _T("cmd") || ext == ("bat"))
        {
                // Check if file exists
-               CFileStatus status;
-               if (CFile::GetStatus(path, status))
+               struct _stati64 statBuffer;
+               int nRetVal = _tstati64(path, &statBuffer);
+               if (nRetVal > -1)
                        return TRUE;
        }
        return FALSE;
index 6b06bb1..c72b044 100644 (file)
@@ -5,6 +5,8 @@
  PATCH: [ 1373037 ] Fix filter dialog to correctly add new filters
   Submitted by Perry
   Src: FileFiltersDlg.cpp
+ PATCH: [ 1370183 ] ShellExtension: better way to check for WinMerge executable
+  ShellExtension: WinMergeShell.cpp
 
 2005-12-04 Perry
  PATCH: [ 1372974 ] Make local function "GuessEncoding_from_bytes" static