mirror of https://github.com/stella-emu/stella.git
Potential speedup in FSNodeWINDOWS::getSize().
This commit is contained in:
parent
608ed4f748
commit
db7fd59423
|
@ -88,7 +88,7 @@ string FSNodeWINDOWS::getShortPath() const
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
size_t FSNodeWINDOWS::getSize() const
|
size_t FSNodeWINDOWS::getSize() const
|
||||||
{
|
{
|
||||||
if (_size == 0)
|
if (_size == 0 && _isFile)
|
||||||
{
|
{
|
||||||
struct _stat st;
|
struct _stat st;
|
||||||
_size = _stat(_path.c_str(), &st) == 0 ? st.st_size : 0;
|
_size = _stat(_path.c_str(), &st) == 0 ? st.st_size : 0;
|
||||||
|
|
Loading…
Reference in New Issue