Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
fefb5da4
Commit
fefb5da4
authored
Sep 17, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Make creating a backup optional for shell folders.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd378638
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+8
-5
mountmgr.h
include/ddk/mountmgr.h
+1
-0
drive.c
programs/winecfg/drive.c
+1
-0
No files found.
dlls/mountmgr.sys/mountmgr.c
View file @
fefb5da4
...
...
@@ -335,13 +335,16 @@ static NTSTATUS define_shell_folder( const void *in_buff, SIZE_T insize )
if
(
status
!=
STATUS_BUFFER_TOO_SMALL
)
return
status
;
}
if
(
!
(
backup
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buffer
)
+
sizeof
(
".backup"
)
))
)
if
(
input
->
create_backup
)
{
status
=
STATUS_NO_MEMORY
;
goto
done
;
if
(
!
(
backup
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buffer
)
+
sizeof
(
".backup"
)
)))
{
status
=
STATUS_NO_MEMORY
;
goto
done
;
}
strcpy
(
backup
,
buffer
);
strcat
(
backup
,
".backup"
);
}
strcpy
(
backup
,
buffer
);
strcat
(
backup
,
".backup"
);
if
(
!
lstat
(
buffer
,
&
st
))
/* move old folder/link out of the way */
{
...
...
include/ddk/mountmgr.h
View file @
fefb5da4
...
...
@@ -80,6 +80,7 @@ struct mountmgr_unix_drive
struct
mountmgr_shell_folder
{
BOOL
create_backup
;
ULONG
folder_offset
;
ULONG
folder_size
;
ULONG
symlink_offset
;
...
...
programs/winecfg/drive.c
View file @
fefb5da4
...
...
@@ -362,6 +362,7 @@ void set_shell_folder( const WCHAR *path, const char *dest )
if
(
dest
)
len
+=
strlen
(
dest
)
+
1
;
if
(
!
(
ioctl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
;
ioctl
->
create_backup
=
TRUE
;
ioctl
->
folder_offset
=
sizeof
(
*
ioctl
);
ioctl
->
folder_size
=
nt_name
.
Length
;
memcpy
(
(
char
*
)
ioctl
+
ioctl
->
folder_offset
,
nt_name
.
Buffer
,
nt_name
.
Length
);
...
...
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