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
b84f3093
Commit
b84f3093
authored
Jun 02, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jun 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Avoid Unicode->ANSI conversion when deleting a file.
parent
9879a47f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
15 deletions
+19
-15
shell32_main.h
dlls/shell32/shell32_main.h
+2
-2
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+16
-11
shlfileop.c
dlls/shell32/shlfileop.c
+1
-2
No files found.
dlls/shell32/shell32_main.h
View file @
b84f3093
...
...
@@ -147,8 +147,8 @@ void FreeChangeNotifications(void);
#define ASK_CREATE_FOLDER 4
#define ASK_OVERWRITE_FILE 5
BOOL
SHELL_DeleteDirectory
A
(
LPCSTR
p
szDir
,
BOOL
bShowUI
);
BOOL
SHELL_DeleteFile
A
(
LPCSTR
p
szFile
,
BOOL
bShowUI
);
BOOL
SHELL_DeleteDirectory
W
(
LPCWSTR
pw
szDir
,
BOOL
bShowUI
);
BOOL
SHELL_DeleteFile
W
(
LPCWSTR
pw
szFile
,
BOOL
bShowUI
);
BOOL
SHELL_ConfirmDialog
(
int
nKindOfDialog
,
LPCSTR
szDir
);
/* 16-bit functions */
...
...
dlls/shell32/shfldr_fs.c
View file @
b84f3093
...
...
@@ -1164,7 +1164,8 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
{
IGenericSFImpl
*
This
=
impl_from_ISFHelper
(
iface
);
UINT
i
;
char
szPath
[
MAX_PATH
];
WCHAR
wszPath
[
MAX_PATH
];
int
iPathLen
;
BOOL
bConfirm
=
TRUE
;
TRACE
(
"(%p)(%u %p)
\n
"
,
This
,
cidl
,
apidl
);
...
...
@@ -1179,18 +1180,22 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
bConfirm
=
FALSE
;
}
if
(
This
->
sPathTarget
)
lstrcpynW
(
wszPath
,
This
->
sPathTarget
,
MAX_PATH
);
else
wszPath
[
0
]
=
'\0'
;
PathAddBackslashW
(
wszPath
);
iPathLen
=
lstrlenW
(
wszPath
);
for
(
i
=
0
;
i
<
cidl
;
i
++
)
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
szPath
,
MAX_PATH
,
NULL
,
NULL
))
szPath
[
0
]
=
'\0'
;
PathAddBackslashA
(
szPath
);
_ILSimpleGetText
(
apidl
[
i
],
szPath
+
strlen
(
szPath
),
MAX_PATH
);
_ILSimpleGetTextW
(
apidl
[
i
],
wszPath
+
iPathLen
,
MAX_PATH
-
iPathLen
);
if
(
_ILIsFolder
(
apidl
[
i
]))
{
LPITEMIDLIST
pidl
;
TRACE
(
"delete %s
\n
"
,
szPath
);
if
(
!
SHELL_DeleteDirectory
A
(
szPath
,
bConfirm
))
{
TRACE
(
"delete %s failed, bConfirm=%d
\n
"
,
szPath
,
bConfirm
);
TRACE
(
"delete %s
\n
"
,
debugstr_w
(
wszPath
)
);
if
(
!
SHELL_DeleteDirectory
W
(
w
szPath
,
bConfirm
))
{
TRACE
(
"delete %s failed, bConfirm=%d
\n
"
,
debugstr_w
(
wszPath
)
,
bConfirm
);
return
E_FAIL
;
}
pidl
=
ILCombine
(
This
->
pidlRoot
,
apidl
[
i
]);
...
...
@@ -1199,9 +1204,9 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
}
else
if
(
_ILIsValue
(
apidl
[
i
]))
{
LPITEMIDLIST
pidl
;
TRACE
(
"delete %s
\n
"
,
szPath
);
if
(
!
SHELL_DeleteFile
A
(
szPath
,
bConfirm
))
{
TRACE
(
"delete %s failed, bConfirm=%d
\n
"
,
szPath
,
bConfirm
);
TRACE
(
"delete %s
\n
"
,
debugstr_w
(
wszPath
)
);
if
(
!
SHELL_DeleteFile
W
(
w
szPath
,
bConfirm
))
{
TRACE
(
"delete %s failed, bConfirm=%d
\n
"
,
debugstr_w
(
wszPath
)
,
bConfirm
);
return
E_FAIL
;
}
pidl
=
ILCombine
(
This
->
pidlRoot
,
apidl
[
i
]);
...
...
dlls/shell32/shlfileop.c
View file @
b84f3093
...
...
@@ -55,7 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
static
const
WCHAR
wWildcardFile
[]
=
{
'*'
,
0
};
static
const
WCHAR
wWildcardChars
[]
=
{
'*'
,
'?'
,
0
};
static
BOOL
SHELL_DeleteDirectoryW
(
LPCWSTR
path
,
BOOL
bShowUI
);
static
DWORD
SHNotifyCreateDirectoryA
(
LPCSTR
path
,
LPSECURITY_ATTRIBUTES
sec
);
static
DWORD
SHNotifyCreateDirectoryW
(
LPCWSTR
path
,
LPSECURITY_ATTRIBUTES
sec
);
static
DWORD
SHNotifyRemoveDirectoryA
(
LPCSTR
path
);
...
...
@@ -170,7 +169,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI)
return
ret
;
}
static
BOOL
SHELL_DeleteDirectoryW
(
LPCWSTR
pszDir
,
BOOL
bShowUI
)
BOOL
SHELL_DeleteDirectoryW
(
LPCWSTR
pszDir
,
BOOL
bShowUI
)
{
BOOL
ret
=
TRUE
;
HANDLE
hFind
;
...
...
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