From 336a0bf22a9d287003f78e0582dfb846643454d9 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 26 Jan 2023 17:04:05 -0330 Subject: [PATCH] A few items I forgot in the last commit. --- src/os/windows/FSNodeWINDOWS.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/os/windows/FSNodeWINDOWS.cxx b/src/os/windows/FSNodeWINDOWS.cxx index e4b92fa12..5f3bf84ec 100644 --- a/src/os/windows/FSNodeWINDOWS.cxx +++ b/src/os/windows/FSNodeWINDOWS.cxx @@ -56,12 +56,11 @@ bool FSNodeWINDOWS::setFlags() } else { - _isDirectory = ((fileAttribs & FILE_ATTRIBUTE_DIRECTORY) != 0); - _isFile = !_isDirectory;//((fileAttribs & FILE_ATTRIBUTE_NORMAL) != 0); + _isDirectory = static_cast(fileAttribs & FILE_ATTRIBUTE_DIRECTORY); + _isFile = !_isDirectory; // Add a trailing backslash, if necessary - if (_isDirectory && _path.length() > 0 && - _path[_path.length()-1] != FSNode::PATH_SEPARATOR) + if (_isDirectory && _path.length() > 0 && _path.back() != FSNode::PATH_SEPARATOR) _path += FSNode::PATH_SEPARATOR; } _isPseudoRoot = false;