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
6d59ddf6
Commit
6d59ddf6
authored
Jan 29, 2008
by
Jens Nestler
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Don't fail unconditionally in MoveFile for directories with flag…
kernel32: Don't fail unconditionally in MoveFile for directories with flag MOVEFILE_REPLACE_EXISTING.
parent
43083236
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
path.c
dlls/kernel32/path.c
+6
-10
No files found.
dlls/kernel32/path.c
View file @
6d59ddf6
...
...
@@ -1042,15 +1042,6 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
goto
error
;
}
if
(
info
.
FileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
if
(
flag
&
MOVEFILE_REPLACE_EXISTING
)
/* cannot replace directory */
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
goto
error
;
}
}
/* we must have write access to the destination, and it must */
/* not exist except if MOVEFILE_REPLACE_EXISTING is set */
...
...
@@ -1061,7 +1052,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
}
status
=
NtOpenFile
(
&
dest_handle
,
GENERIC_READ
|
GENERIC_WRITE
,
&
attr
,
&
io
,
0
,
FILE_NON_DIRECTORY_FILE
|
FILE_SYNCHRONOUS_IO_NONALERT
);
if
(
status
==
STATUS_SUCCESS
)
if
(
status
==
STATUS_SUCCESS
)
/* destination exists */
{
NtClose
(
dest_handle
);
if
(
!
(
flag
&
MOVEFILE_REPLACE_EXISTING
))
...
...
@@ -1070,6 +1061,11 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
RtlFreeUnicodeString
(
&
nt_name
);
goto
error
;
}
else
if
(
info
.
FileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
/* cannot replace directory */
{
SetLastError
(
ERROR_ACCESS_DENIED
);
goto
error
;
}
}
else
if
(
status
!=
STATUS_OBJECT_NAME_NOT_FOUND
)
{
...
...
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