* syscalls.cc (_link): Avoid extraneous call to cygwin_conv_to_win32_path.

This commit is contained in:
Christopher Faylor
2000-07-26 01:44:16 +00:00
parent 738c2431e5
commit 2a1a9785eb
3 changed files with 122 additions and 83 deletions

View File

@@ -494,8 +494,8 @@ int
_link (const char *a, const char *b)
{
int res = -1;
path_conv real_a (a, PC_SYM_NOFOLLOW);
path_conv real_b (b, PC_SYM_NOFOLLOW);
path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL);
path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL);
if (real_a.error)
{
@@ -525,7 +525,6 @@ _link (const char *a, const char *b)
DWORD cbPathLen;
DWORD StreamSize;
WCHAR wbuf[MAX_PATH];
char buf[MAX_PATH];
BOOL bSuccess;
@@ -546,8 +545,7 @@ _link (const char *a, const char *b)
}
lpContext = NULL;
cygwin_conv_to_full_win32_path (real_b.get_win32 (), buf);
cbPathLen = sys_mbstowcs (wbuf, buf, MAX_PATH) * sizeof (WCHAR);
cbPathLen = sys_mbstowcs (wbuf, real_b.get_win32 (), MAX_PATH) * sizeof (WCHAR);
StreamId.dwStreamId = BACKUP_LINK;
StreamId.dwStreamAttributes = 0;