Create symlinks (CreateSymbolicLink)

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Igormcd
Newbie
Newbie
Posts: 2
Joined: Tue Apr 07, 2015 4:28 am

Create symlinks (CreateSymbolicLink)

Post by Igormcd »

I'm using Far Manager (http://www.farmanager.com, MC-like file manager) under Wine 1.7.38.
The app fails to create symbolic links. I assume the CreateSymbolicLink WinAPI is not supported in Wine. Is it correct?
Is there symlink APIs planned to be supported in Wine?
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: Create symlinks (CreateSymbolicLink)

Post by olivierfrdierick »

The linked page below seems to indicate that CreateSymbolicLink function is implemented in Wine.
You may want to analyse your issue further.

Link: kernel32: Implement CreateSymbolicLinkA/W by reusing a modified IoCreateSymbolicLink
Igormcd
Newbie
Newbie
Posts: 2
Joined: Tue Apr 07, 2015 4:28 am

Re: Create symlinks (CreateSymbolicLink)

Post by Igormcd »

Existing source code has no the implementation.
Instead there are stubs in dll/kernel32/path.c

Code: Select all

/*************************************************************************
 *           CreateSymbolicLinkW   (KERNEL32.@)
 */
BOOL WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
{
    FIXME("(%s %s %d): stub\n", debugstr_w(link), debugstr_w(target), flags);
    return TRUE;
}

/*************************************************************************
 *           CreateSymbolicLinkA   (KERNEL32.@)
 */
BOOL WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags)
{
    FIXME("(%s %s %d): stub\n", debugstr_a(link), debugstr_a(target), flags);
    return TRUE;
}
by the link there is http://bugs.winehq.org/show_bug.cgi?id=27108 on top
and it has "CreateSymbolicLinkW depends on Bug 12401".
I assume the patch was never merged.
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: Create symlinks (CreateSymbolicLink)

Post by olivierfrdierick »

Igormcd wrote:Existing source code has no the implementation.
Instead there are stubs in dll/kernel32/path.c
(...)
I assume the patch was never merged.
I attach an updated patch for Wine 1.7.41.
Feel free to test it.
Attachments
Implement-CreateSymbolicLinkA-W-by-using-NtCreateSymolicLinkObject.patch.tar.gz
File is a tar.gz compressed simplified patch file (no mail headers).
(870 Bytes) Downloaded 288 times
Locked