mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
shell32: Use remove() instead of rmdir().
rmdir() will fail when target is a symbolic link. Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7ffb4a912c
commit
dad2223ad6
1 changed files with 3 additions and 3 deletions
|
@ -4318,7 +4318,7 @@ static void _SHCreateSymbolicLinks(void)
|
|||
}
|
||||
|
||||
/* Replace 'My Documents' directory with a symlink or fail silently if not empty. */
|
||||
rmdir(pszPersonal);
|
||||
remove(pszPersonal);
|
||||
symlink(szPersonalTarget, pszPersonal);
|
||||
}
|
||||
else
|
||||
|
@ -4374,7 +4374,7 @@ static void _SHCreateSymbolicLinks(void)
|
|||
strcpy(szMyStuffTarget, szPersonalTarget);
|
||||
break;
|
||||
}
|
||||
rmdir(pszMyStuff);
|
||||
remove(pszMyStuff);
|
||||
symlink(szMyStuffTarget, pszMyStuff);
|
||||
HeapFree(GetProcessHeap(), 0, pszMyStuff);
|
||||
}
|
||||
|
@ -4395,7 +4395,7 @@ static void _SHCreateSymbolicLinks(void)
|
|||
SHGFP_TYPE_DEFAULT, wszTempPath);
|
||||
if (SUCCEEDED(hr) && (pszDesktop = wine_get_unix_file_name(wszTempPath)))
|
||||
{
|
||||
rmdir(pszDesktop);
|
||||
remove(pszDesktop);
|
||||
if (xdg_desktop_dir)
|
||||
symlink(xdg_desktop_dir, pszDesktop);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue