Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-10-17 21:19:31 +0400
committerChristopher Faylor <me@cgf.cx>2003-10-17 21:19:31 +0400
commitfa10472e4a49b10361b85736b8d8c75895db4edb (patch)
tree910c4c4e72b02f152bbe781a4f7e11547d2fbe15 /winsup/utils/cygpath.cc
parent5320b93f4e567564f90ec0eb8f30227b15e65ebd (diff)
* cygcheck.cc (pretty_id): Don't exec if `id' program is not found.
Diffstat (limited to 'winsup/utils/cygpath.cc')
-rw-r--r--winsup/utils/cygpath.cc27
1 files changed, 8 insertions, 19 deletions
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 68a2407fc..66a4aa31d 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -9,6 +9,8 @@ details. */
#define NOCOMATTRIBUTE
+#define _WIN32_IE 0x0400
+
#include <shlobj.h>
#include <stdio.h>
#include <string.h>
@@ -330,7 +332,6 @@ dowin (char option)
char *buf, buf1[MAX_PATH], buf2[MAX_PATH];
DWORD len = MAX_PATH;
WIN32_FIND_DATA w32_fd;
- LPITEMIDLIST id;
HINSTANCE k32;
BOOL (*GetProfilesDirectoryAPtr) (LPSTR, LPDWORD) = 0;
@@ -338,27 +339,15 @@ dowin (char option)
switch (option)
{
case 'D':
- SHGetSpecialFolderLocation (NULL, allusers_flag ?
- CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOPDIRECTORY, &id);
- SHGetPathFromIDList (id, buf);
- /* This if clause is a Fix for Win95 without any "All Users" */
- if (strlen (buf) == 0)
- {
- SHGetSpecialFolderLocation (NULL, CSIDL_DESKTOPDIRECTORY, &id);
- SHGetPathFromIDList (id, buf);
- }
+ if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
+ CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOPDIRECTORY, FALSE))
+ SHGetSpecialFolderPath (NULL, buf, CSIDL_DESKTOPDIRECTORY, FALSE);
break;
case 'P':
- SHGetSpecialFolderLocation (NULL, allusers_flag ?
- CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, &id);
- SHGetPathFromIDList (id, buf);
- /* This if clause is a Fix for Win95 without any "All Users" */
- if (strlen (buf) == 0)
- {
- SHGetSpecialFolderLocation (NULL, CSIDL_PROGRAMS, &id);
- SHGetPathFromIDList (id, buf);
- }
+ if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
+ CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, FALSE))
+ SHGetSpecialFolderPath (NULL, buf, CSIDL_PROGRAMS, FALSE);
break;
case 'H':