From db7fd594238c758fbe45b46a23f80026273e532e Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Fri, 30 Jun 2023 22:40:05 -0230 Subject: [PATCH] Potential speedup in FSNodeWINDOWS::getSize(). --- src/os/windows/FSNodeWINDOWS.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/windows/FSNodeWINDOWS.cxx b/src/os/windows/FSNodeWINDOWS.cxx index f9a648781..cf6d2a666 100644 --- a/src/os/windows/FSNodeWINDOWS.cxx +++ b/src/os/windows/FSNodeWINDOWS.cxx @@ -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;