Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bf811fdc
Commit
bf811fdc
authored
Sep 06, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Pass the destination Windows path to _SHCreateSymbolicLink().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a71ea73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
shellpath.c
dlls/shell32/shellpath.c
+11
-12
No files found.
dlls/shell32/shellpath.c
View file @
bf811fdc
...
@@ -4202,7 +4202,7 @@ static void _SHCreateMyDocumentsSubDirs(const UINT * aidsMyStuff, const UINT num
...
@@ -4202,7 +4202,7 @@ static void _SHCreateMyDocumentsSubDirs(const UINT * aidsMyStuff, const UINT num
* aidsMyStuff [I] Array of IDS_* resources to create sub dirs for.
* aidsMyStuff [I] Array of IDS_* resources to create sub dirs for.
* aids_num [I] Number of elements in aidsMyStuff.
* aids_num [I] Number of elements in aidsMyStuff.
*/
*/
static
void
_SHCreateMyDocumentsSymbolicLink
(
const
UINT
*
aidsMyStuff
,
const
UINT
aids_num
)
static
void
_SHCreateMyDocumentsSymbolicLink
(
const
UINT
*
aidsMyStuff
,
const
UINT
aids_num
,
const
WCHAR
*
path
)
{
{
static
const
char
*
const
xdg_dirs
[]
=
{
"DOCUMENTS"
};
static
const
char
*
const
xdg_dirs
[]
=
{
"DOCUMENTS"
};
static
const
unsigned
int
num
=
ARRAY_SIZE
(
xdg_dirs
);
static
const
unsigned
int
num
=
ARRAY_SIZE
(
xdg_dirs
);
...
@@ -4212,7 +4212,7 @@ static void _SHCreateMyDocumentsSymbolicLink(const UINT * aidsMyStuff, const UIN
...
@@ -4212,7 +4212,7 @@ static void _SHCreateMyDocumentsSymbolicLink(const UINT * aidsMyStuff, const UIN
char
**
xdg_results
;
char
**
xdg_results
;
/* Get the unix path of 'My Documents'. */
/* Get the unix path of 'My Documents'. */
pszPersonal
=
_SHGetFolderUnixPath
(
CSIDL_PERSONAL
|
CSIDL_FLAG_DONT_VERIFY
);
pszPersonal
=
wine_get_unix_file_name
(
path
);
if
(
!
pszPersonal
)
return
;
if
(
!
pszPersonal
)
return
;
_SHGetXDGUserDirs
(
xdg_dirs
,
num
,
&
xdg_results
);
_SHGetXDGUserDirs
(
xdg_dirs
,
num
,
&
xdg_results
);
...
@@ -4284,7 +4284,7 @@ static void _SHCreateMyDocumentsSymbolicLink(const UINT * aidsMyStuff, const UIN
...
@@ -4284,7 +4284,7 @@ static void _SHCreateMyDocumentsSymbolicLink(const UINT * aidsMyStuff, const UIN
* PARAMS
* PARAMS
* nFolder [I] CSIDL identifying the folder.
* nFolder [I] CSIDL identifying the folder.
*/
*/
static
void
_SHCreateMyStuffSymbolicLink
(
int
nFolder
)
static
void
_SHCreateMyStuffSymbolicLink
(
int
nFolder
,
const
WCHAR
*
path
)
{
{
static
const
UINT
aidsMyStuff
[]
=
{
static
const
UINT
aidsMyStuff
[]
=
{
IDS_MYPICTURES
,
IDS_MYVIDEOS
,
IDS_MYMUSIC
,
IDS_DOWNLOADS
,
IDS_TEMPLATES
IDS_MYPICTURES
,
IDS_MYVIDEOS
,
IDS_MYMUSIC
,
IDS_DOWNLOADS
,
IDS_TEMPLATES
...
@@ -4328,8 +4328,7 @@ static void _SHCreateMyStuffSymbolicLink(int nFolder)
...
@@ -4328,8 +4328,7 @@ static void _SHCreateMyStuffSymbolicLink(int nFolder)
while
(
1
)
while
(
1
)
{
{
/* Get the current 'My Whatever' folder unix path. */
pszMyStuff
=
wine_get_unix_file_name
(
path
);
pszMyStuff
=
_SHGetFolderUnixPath
(
acsidlMyStuff
[
i
]
|
CSIDL_FLAG_DONT_VERIFY
);
if
(
!
pszMyStuff
)
break
;
if
(
!
pszMyStuff
)
break
;
while
(
1
)
while
(
1
)
...
@@ -4375,7 +4374,7 @@ static void _SHCreateMyStuffSymbolicLink(int nFolder)
...
@@ -4375,7 +4374,7 @@ static void _SHCreateMyStuffSymbolicLink(int nFolder)
* Sets up a symbolic link for the 'Desktop' shell folder to point into the
* Sets up a symbolic link for the 'Desktop' shell folder to point into the
* users home directory.
* users home directory.
*/
*/
static
void
_SHCreateDesktopSymbolicLink
(
void
)
static
void
_SHCreateDesktopSymbolicLink
(
const
WCHAR
*
path
)
{
{
static
const
char
*
const
xdg_dirs
[]
=
{
"DESKTOP"
};
static
const
char
*
const
xdg_dirs
[]
=
{
"DESKTOP"
};
static
const
unsigned
int
num
=
ARRAY_SIZE
(
xdg_dirs
);
static
const
unsigned
int
num
=
ARRAY_SIZE
(
xdg_dirs
);
...
@@ -4405,7 +4404,7 @@ static void _SHCreateDesktopSymbolicLink(void)
...
@@ -4405,7 +4404,7 @@ static void _SHCreateDesktopSymbolicLink(void)
(
_SHAppendToUnixPath
(
szDesktopTarget
,
DesktopW
)
&&
(
_SHAppendToUnixPath
(
szDesktopTarget
,
DesktopW
)
&&
!
stat
(
szDesktopTarget
,
&
statFolder
)
&&
S_ISDIR
(
statFolder
.
st_mode
)))
!
stat
(
szDesktopTarget
,
&
statFolder
)
&&
S_ISDIR
(
statFolder
.
st_mode
)))
{
{
pszDesktop
=
_SHGetFolderUnixPath
(
CSIDL_DESKTOPDIRECTORY
|
CSIDL_FLAG_DONT_VERIFY
);
pszDesktop
=
wine_get_unix_file_name
(
path
);
if
(
pszDesktop
)
if
(
pszDesktop
)
{
{
if
(
xdg_desktop_dir
)
if
(
xdg_desktop_dir
)
...
@@ -4428,7 +4427,7 @@ static void _SHCreateDesktopSymbolicLink(void)
...
@@ -4428,7 +4427,7 @@ static void _SHCreateDesktopSymbolicLink(void)
* PARAMS
* PARAMS
* nFolder [I] CSIDL identifying the folder.
* nFolder [I] CSIDL identifying the folder.
*/
*/
static
void
_SHCreateSymbolicLink
(
int
nFolder
)
static
void
_SHCreateSymbolicLink
(
int
nFolder
,
const
WCHAR
*
path
)
{
{
static
const
UINT
aidsMyStuff
[]
=
{
static
const
UINT
aidsMyStuff
[]
=
{
IDS_MYPICTURES
,
IDS_MYVIDEOS
,
IDS_MYMUSIC
,
IDS_DOWNLOADS
,
IDS_TEMPLATES
IDS_MYPICTURES
,
IDS_MYVIDEOS
,
IDS_MYMUSIC
,
IDS_DOWNLOADS
,
IDS_TEMPLATES
...
@@ -4437,17 +4436,17 @@ static void _SHCreateSymbolicLink(int nFolder)
...
@@ -4437,17 +4436,17 @@ static void _SHCreateSymbolicLink(int nFolder)
switch
(
folder
)
{
switch
(
folder
)
{
case
CSIDL_PERSONAL
:
case
CSIDL_PERSONAL
:
_SHCreateMyDocumentsSymbolicLink
(
aidsMyStuff
,
ARRAY_SIZE
(
aidsMyStuff
));
_SHCreateMyDocumentsSymbolicLink
(
aidsMyStuff
,
ARRAY_SIZE
(
aidsMyStuff
)
,
path
);
break
;
break
;
case
CSIDL_MYPICTURES
:
case
CSIDL_MYPICTURES
:
case
CSIDL_MYVIDEO
:
case
CSIDL_MYVIDEO
:
case
CSIDL_MYMUSIC
:
case
CSIDL_MYMUSIC
:
case
CSIDL_DOWNLOADS
:
case
CSIDL_DOWNLOADS
:
case
CSIDL_TEMPLATES
:
case
CSIDL_TEMPLATES
:
_SHCreateMyStuffSymbolicLink
(
folder
);
_SHCreateMyStuffSymbolicLink
(
folder
,
path
);
break
;
break
;
case
CSIDL_DESKTOPDIRECTORY
:
case
CSIDL_DESKTOPDIRECTORY
:
_SHCreateDesktopSymbolicLink
();
_SHCreateDesktopSymbolicLink
(
path
);
break
;
break
;
}
}
}
}
...
@@ -4642,7 +4641,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
...
@@ -4642,7 +4641,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
/* create symbolic links rather than directories for specific
/* create symbolic links rather than directories for specific
* user shell folders */
* user shell folders */
_SHCreateSymbolicLink
(
folder
);
_SHCreateSymbolicLink
(
folder
,
szBuildPath
);
/* create directory/directories */
/* create directory/directories */
ret
=
SHCreateDirectoryExW
(
hwndOwner
,
szBuildPath
,
NULL
);
ret
=
SHCreateDirectoryExW
(
hwndOwner
,
szBuildPath
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment