Jactry Zeng : shell32: Use remove() instead of rmdir().
Alexandre Julliard
julliard at winehq.org
Tue Jul 26 10:44:43 CDT 2016
Module: wine
Branch: master
Commit: dad2223ad6df1ed8aa358f7a4ee6f6438a5abe91
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dad2223ad6df1ed8aa358f7a4ee6f6438a5abe91
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Fri Jul 22 15:40:55 2016 +0800
shell32: Use remove() instead of rmdir().
rmdir() will fail when target is a symbolic link.
Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/shellpath.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index cb79d6f..2072814 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -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
More information about the wine-cvs
mailing list