From bfee44de18c56f7692a8c41a5a9a8e90a39ea5da Mon Sep 17 00:00:00 2001 From: atbara46 Date: Thu, 23 Jul 2020 16:30:16 +0200 Subject: [PATCH] Fix wrongly detecting FIFOs as directories in wxFileName The constants for wxFILE_EXISTS_FIFO and wxFILE_EXISTS_SOCKET were wrongly defined, mixing up their decimal and hexadecimal values, resulting in wxFILE_EXISTS_FIFO & wxFILE_EXISTS_DIR being wrongly non zero. Fix this by redefining these bit masks correctly to avoid overlapping the other values. Closes #18846. --- include/wx/filename.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/filename.h b/include/wx/filename.h index 9063b81ad2..25ed41977b 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -105,8 +105,8 @@ enum // also sets wxFILE_EXISTS_NO_FOLLOW as // it would never be satisfied otherwise wxFILE_EXISTS_DEVICE = 0x0008, // check for existence of a device - wxFILE_EXISTS_FIFO = 0x0016, // check for existence of a FIFO - wxFILE_EXISTS_SOCKET = 0x0032, // check for existence of a socket + wxFILE_EXISTS_FIFO = 0x0010, // check for existence of a FIFO + wxFILE_EXISTS_SOCKET = 0x0020, // check for existence of a socket // gap for future types wxFILE_EXISTS_NO_FOLLOW = 0x1000, // don't dereference a contained symlink wxFILE_EXISTS_ANY = 0x1FFF // check for existence of anything