We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdbd33c commit e84bd60Copy full SHA for e84bd60
src/nbl/system/ISystem.cpp
@@ -114,15 +114,15 @@ bool ISystem::createDirectory(const system::path& p)
114
115
bool ISystem::deleteDirectory(const system::path& p)
116
{
117
- if (std::filesystem::exists(p))
+ if (std::filesystem::exists(p) && std::filesystem::is_directory(p))
118
return std::filesystem::remove_all(p);
119
else
120
return false;
121
}
122
123
bool nbl::system::ISystem::deleteFile(const system::path& p)
124
125
+ if (std::filesystem::exists(p) && !std::filesystem::is_directory(p)))
126
return std::filesystem::remove(p);
127
128
0 commit comments