Replace is_directory checking method
parent
0754b85ee1
commit
56ac73be36
|
@ -261,7 +261,8 @@ void VirtualTexture::populateTileTree()
|
|||
for (int i = 0; i < MaxResolutionLevels; i++)
|
||||
{
|
||||
fs::path path = tilePath / fmt::sprintf("level%d", i);
|
||||
if (fs::is_directory(path))
|
||||
std::error_code ec;
|
||||
if (fs::is_directory(path, ec))
|
||||
{
|
||||
maxLevel = i + baseSplit;
|
||||
int uLimit = 2 << maxLevel;
|
||||
|
|
|
@ -100,7 +100,8 @@ static bool is_valid_directory(const fs::path& dir)
|
|||
if (dir.empty())
|
||||
return false;
|
||||
|
||||
if (!is_directory(dir))
|
||||
std::error_code ec;
|
||||
if (!fs::is_directory(dir, ec))
|
||||
{
|
||||
fmt::fprintf(cerr, "Path %s doesn't exist or isn't a directory", dir);
|
||||
return false;
|
||||
|
|
|
@ -165,7 +165,8 @@ static string lua_path(const CelestiaConfig *config)
|
|||
if (dir.empty())
|
||||
continue;
|
||||
|
||||
if (!is_directory(dir))
|
||||
std::error_code ec;
|
||||
if (!fs::is_directory(dir, ec))
|
||||
{
|
||||
fmt::fprintf(cerr, "Path %s doesn't exist or isn't a directory", dir);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue