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
6fd9d774
Commit
6fd9d774
authored
Oct 14, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Make RENAME work for read-only files.
parent
d5523fcd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
builtins.c
programs/cmd/builtins.c
+3
-12
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+1
-1
No files found.
programs/cmd/builtins.c
View file @
6fd9d774
...
...
@@ -1768,8 +1768,8 @@ void WCMD_remove_dir (WCHAR *command) {
* Rename a file.
*/
void
WCMD_rename
(
void
)
{
void
WCMD_rename
(
void
)
{
int
status
;
HANDLE
hff
;
WIN32_FIND_DATAW
fd
;
...
...
@@ -1779,7 +1779,6 @@ void WCMD_rename (void) {
WCHAR
dir
[
MAX_PATH
];
WCHAR
fname
[
MAX_PATH
];
WCHAR
ext
[
MAX_PATH
];
DWORD
attribs
;
errorlevel
=
0
;
...
...
@@ -1853,15 +1852,7 @@ void WCMD_rename (void) {
WINE_TRACE
(
"Source '%s'
\n
"
,
wine_dbgstr_w
(
src
));
WINE_TRACE
(
"Dest '%s'
\n
"
,
wine_dbgstr_w
(
dest
));
/* Check if file is read only, otherwise move it */
attribs
=
GetFileAttributesW
(
src
);
if
((
attribs
!=
INVALID_FILE_ATTRIBUTES
)
&&
(
attribs
&
FILE_ATTRIBUTE_READONLY
))
{
SetLastError
(
ERROR_ACCESS_DENIED
);
status
=
0
;
}
else
{
status
=
MoveFileW
(
src
,
dest
);
}
status
=
MoveFileW
(
src
,
dest
);
if
(
!
status
)
{
WCMD_print_error
();
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
6fd9d774
...
...
@@ -602,7 +602,7 @@ bar renamed to foo
foo
bar
... rename read-only files ...
@todo_wine@
read-only file renamed
read-only file renamed
... rename directories ...
dir renamed
read-only dir renamed
...
...
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