[MDEV-13106] Installer complains that directory is not empty Created: 2017-06-16  Updated: 2017-06-19  Resolved: 2017-06-19

Status: Closed
Project: MariaDB Server
Component/s: Packaging, Platform Windows
Affects Version/s: 10.2.6
Fix Version/s: 10.1.25

Type: Bug Priority: Minor
Reporter: Thomas Hoffmann Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: Intaller, empty, folder
Environment:

Windows 10



 Description   

Hello,
when I choose an empty DB folder during installation, the installer complains that it is not empty.
I took a look at the sources and maybe there is an error.
https://github.com/atcurtis/mariadb/blob/master/win/packaging/ca/CustomAction.cpp#L181
Line 181 checks the filename for . or ..
wcscmp returns 0 if the strings are equal (which is interpreted as "false").
This means the if statement is true, if the name is not equal . or not equal ..
This expression is always true becaue every name is not equal . or not equal ..
The operator should be && instead of ||

Regards,
Thomas


Generated at Thu Feb 08 08:02:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.