1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Adrian Buehlmann  committed d5ac2e7

shellext: use default security attribs in CreateFileA call

  • Participants
  • Parent commits 8870759
  • Branches default

Comments (0)

Files changed (1)

File win32/shellext/ContextMenu.cpp

View file
  • Ignore whitespace
         cwd = IsDirectory(myFiles[0])? myFiles[0] : DirName(myFiles[0]);
 
         const std::string tempfile = GetTemporaryFile();
-        SECURITY_ATTRIBUTES sa;
-        memset(&sa, 0, sizeof(sa));
-        sa.nLength = sizeof(sa);
-        sa.bInheritHandle = TRUE;
 
         TDEBUG_TRACE("DoHgtk: temp file = " << tempfile);
         HANDLE tempfileHandle = CreateFileA(
             tempfile.c_str(), GENERIC_WRITE,
-            FILE_SHARE_READ, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
+            FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
         );
 
         if (tempfileHandle == INVALID_HANDLE_VALUE)