[Bug 46816] New: Incorrect behavior of SHFileOperation
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun Mar 10 12:16:19 CDT 2019
https://bugs.winehq.org/show_bug.cgi?id=46816
Bug ID: 46816
Summary: Incorrect behavior of SHFileOperation
Product: Wine
Version: 4.0
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: shell32
Assignee: wine-bugs at winehq.org
Reporter: rndltrz at hotmail.com
Distribution: ---
Behavior of SHFileOperation differs from windows.
Here is some trivial code that copies a directory:
const wchar_t *const sourceDir = L"C:\\TestDir\0\0";
const wchar_t *const destDir = L"C:\\TestDir2\0\0";
SHFILEOPSTRUCTW do_copy = { 0 };
do_copy.wFunc = FO_COPY;
do_copy.fFlags = FOF_NOCONFIRMMKDIR | FOF_NOCONFIRMATION | FOF_NO_UI;
do_copy.pFrom = sourceDir;
do_copy.pTo = destDir;
SHFileOperationW(&do_copy);
If you add trailing backslash to destDir:
const wchar_t *const destDir = L"C:\\TestDir2\\\0\0";
On Windows result would be the same. However, on WINE+linux result would be
different:
no backslashes:
$ls TestDir
file.txt Subdir1 Subdir2
$ls TestDir2
file.txt Subdir1 Subdir2
with trailing backslash:
$ls TestDir
file.txt Subdir1 Subdir2
$ls TestDir2
TestDir
This causes issues with programs that rely on Windows behavior.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list