* cygpath.cc (do_sysfolders): Use cygwin_conv_path.
(do_pathconv): Use cygwin_conv_path and cygwin_conv_path_list. * dumper.cc (main): Use cygwin_conv_path. Allocate target path dynamically. * mkpasswd.c (current_user): Use cygwin_conv_path. (enum_users): Ditto. * ps.cc (NT_MAX_PATH): Define. (main): Use cygwin_conv_path. * regtool.cc (find_key): Ditto. Allocate target path dynamically. (cmd_save): Ditto.
This commit is contained in:
@@ -888,7 +888,6 @@ main (int argc, char **argv)
|
||||
int opt;
|
||||
const char *p = "";
|
||||
DWORD pid;
|
||||
char win32_name [MAX_PATH];
|
||||
|
||||
while ((opt = getopt_long (argc, argv, "dqhv", longopts, NULL) ) != EOF)
|
||||
switch (opt)
|
||||
@@ -911,8 +910,11 @@ main (int argc, char **argv)
|
||||
|
||||
if (argv && *(argv + optind) && *(argv + optind +1))
|
||||
{
|
||||
*win32_name = '\0';
|
||||
cygwin_conv_to_win32_path (*(argv + optind), win32_name);
|
||||
ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE,
|
||||
*(argv + optind), NULL, 0);
|
||||
char *win32_name = (char *) alloca (len);
|
||||
cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, *(argv + optind),
|
||||
win32_name, len);
|
||||
if ((p = strrchr (win32_name, '\\')))
|
||||
p++;
|
||||
else
|
||||
|
Reference in New Issue
Block a user