* utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned by
FindFirstFile.
This commit is contained in:
parent
e7fd6e5738
commit
c99e136f3d
@ -1,3 +1,8 @@
|
|||||||
|
2007-03-30 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned
|
||||||
|
by FindFirstFile.
|
||||||
|
|
||||||
2007-03-30 Christopher Faylor <me@cgf.cx>
|
2007-03-30 Christopher Faylor <me@cgf.cx>
|
||||||
|
|
||||||
* mount.cc (main): Turn dos file warnings off since we know what we're
|
* mount.cc (main): Turn dos file warnings off since we know what we're
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* cygpath.cc -- convert pathnames between Windows and Unix format
|
/* cygpath.cc -- convert pathnames between Windows and Unix format
|
||||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
|
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||||
|
2006, 2007 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -375,8 +376,13 @@ get_long_path_name_w32impl (LPCSTR src, LPSTR sbuf, DWORD)
|
|||||||
ptr[len] = 0;
|
ptr[len] = 0;
|
||||||
if (next[1] != ':' && strcmp(next, ".") && strcmp(next, ".."))
|
if (next[1] != ':' && strcmp(next, ".") && strcmp(next, ".."))
|
||||||
{
|
{
|
||||||
if (FindFirstFile (buf2, &w32_fd) != INVALID_HANDLE_VALUE)
|
HANDLE h;
|
||||||
|
h = FindFirstFile (buf2, &w32_fd);
|
||||||
|
if (h != INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
strcpy (ptr, w32_fd.cFileName);
|
strcpy (ptr, w32_fd.cFileName);
|
||||||
|
FindClose (h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ptr += strlen (ptr);
|
ptr += strlen (ptr);
|
||||||
if (pelem)
|
if (pelem)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user