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
6b34fedc
Commit
6b34fedc
authored
Nov 25, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several bug fixes in save_key().
parent
2c655f5e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
registry.c
misc/registry.c
+10
-4
No files found.
misc/registry.c
View file @
6b34fedc
...
...
@@ -181,10 +181,12 @@ static void save_key( HKEY hkey, const char *filename )
int
count
=
0
;
DWORD
ret
;
HANDLE
handle
;
char
*
p
;
char
*
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
filename
)
+
20
);
char
*
name
=
xmalloc
(
strlen
(
filename
)
+
10
)
;
char
*
p
=
strrchr
(
name
,
'/'
);
if
(
p
)
p
++
;
if
(
!
name
)
return
;
strcpy
(
name
,
filename
);
if
(
(
p
=
strrchr
(
name
,
'/'
))
)
p
++
;
else
p
=
name
;
for
(;;)
...
...
@@ -193,9 +195,11 @@ static void save_key( HKEY hkey, const char *filename )
handle
=
FILE_CreateFile
(
name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
FILE_ATTRIBUTE_NORMAL
,
-
1
);
if
(
handle
!=
INVALID_HANDLE_VALUE
)
break
;
if
((
ret
=
GetLastError
())
!=
ERROR_FILE_EXISTS
)
return
;
if
((
ret
=
GetLastError
())
!=
ERROR_FILE_EXISTS
)
break
;
}
if
(
handle
!=
INVALID_HANDLE_VALUE
)
{
req
->
hkey
=
hkey
;
req
->
file
=
handle
;
ret
=
server_call_noerr
(
REQ_SAVE_REGISTRY
);
...
...
@@ -207,6 +211,8 @@ static void save_key( HKEY hkey, const char *filename )
perror
(
"rename"
);
unlink
(
name
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
name
);
}
...
...
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