mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 19:10:36 +08:00
* path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
This commit is contained in:
parent
80ed95f2eb
commit
649033a811
@ -1,6 +1,10 @@
|
|||||||
|
Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
|
||||||
|
|
||||||
Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* shortcut.c: Change symlink condition.
|
* shortcut.c (check_shortcut): Change symlink condition.
|
||||||
|
|
||||||
Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
@ -2202,11 +2202,9 @@ symlink (const char *topath, const char *frompath)
|
|||||||
#if 0
|
#if 0
|
||||||
path_conv win32_path (frompath, PC_SYM_NOFOLLOW);
|
path_conv win32_path (frompath, PC_SYM_NOFOLLOW);
|
||||||
#else
|
#else
|
||||||
char from[MAX_PATH];
|
char from[MAX_PATH + 5];
|
||||||
unsigned short len = strlen (frompath);
|
|
||||||
strcpy (from, frompath);
|
strcpy (from, frompath);
|
||||||
if (len <= 4 || strcasecmp (from + len - 4, ".lnk"))
|
strcat (from, ".lnk");
|
||||||
strcpy (from + len, ".lnk");
|
|
||||||
path_conv win32_path (from, PC_SYM_NOFOLLOW);
|
path_conv win32_path (from, PC_SYM_NOFOLLOW);
|
||||||
path_conv win32_topath;
|
path_conv win32_topath;
|
||||||
char cwd[MAX_PATH + 1], *cp = NULL, c = 0;
|
char cwd[MAX_PATH + 1], *cp = NULL, c = 0;
|
||||||
@ -2296,7 +2294,9 @@ symlink (const char *topath, const char *frompath)
|
|||||||
{
|
{
|
||||||
DWORD written;
|
DWORD written;
|
||||||
create_shortcut_header ();
|
create_shortcut_header ();
|
||||||
len = strlen (topath);
|
/* Don't change the datatypes of `len' and `win_len' since
|
||||||
|
their sizeof is used later. */
|
||||||
|
unsigned short len = strlen (topath);
|
||||||
unsigned short win_len = strlen (w32topath);
|
unsigned short win_len = strlen (w32topath);
|
||||||
if (WriteFile (h, shortcut_header, SHORTCUT_HDR_SIZE, &written, NULL)
|
if (WriteFile (h, shortcut_header, SHORTCUT_HDR_SIZE, &written, NULL)
|
||||||
&& written == SHORTCUT_HDR_SIZE
|
&& written == SHORTCUT_HDR_SIZE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user