Potential speedup in FSNodeWINDOWS::getSize().

This commit is contained in:
Stephen Anthony 2023-06-30 22:40:05 -02:30
parent d47cdb3d3e
commit cf3b9eca89
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ string FSNodeWINDOWS::getShortPath() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
size_t FSNodeWINDOWS::getSize() const
{
if (_size == 0)
if (_size == 0 && _isFile)
{
struct _stat st;
_size = _stat(_path.c_str(), &st) == 0 ? st.st_size : 0;