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:20:06 +0400
committerChristopher Faylor <me@cgf.cx>2003-10-17 21:20:06 +0400
commitce17145aa85631fac876402b0b392c3326b93afb (patch)
tree53035d287981afbaec8d2ca637973eabf06e8ff1 /winsup/utils
parentfa10472e4a49b10361b85736b8d8c75895db4edb (diff)
revert accidental checkin
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/cygpath.cc27
1 files changed, 19 insertions, 8 deletions
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 66a4aa31d..68a2407fc 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -9,8 +9,6 @@ details. */
#define NOCOMATTRIBUTE
-#define _WIN32_IE 0x0400
-
#include <shlobj.h>
#include <stdio.h>
#include <string.h>
@@ -332,6 +330,7 @@ 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;
@@ -339,15 +338,27 @@ dowin (char option)
switch (option)
{
case 'D':
- if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
- CSIDL_COMMON_DESKTOPDIRECTORY : CSIDL_DESKTOPDIRECTORY, FALSE))
- SHGetSpecialFolderPath (NULL, buf, CSIDL_DESKTOPDIRECTORY, FALSE);
+ 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);
+ }
break;
case 'P':
- if (!SHGetSpecialFolderPath (NULL, buf, allusers_flag ?
- CSIDL_COMMON_PROGRAMS : CSIDL_PROGRAMS, FALSE))
- SHGetSpecialFolderPath (NULL, buf, CSIDL_PROGRAMS, FALSE);
+ 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);
+ }
break;
case 'H':