Skip to content

Commit adfd43e

Browse files
committed
check whether a path exists before deleting (android fixes)
1 parent 89dbb88 commit adfd43e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/nbl/system/ISystem.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ class ISystem : public core::IReferenceCounted
371371

372372
bool deleteDirectory(const system::path& p)
373373
{
374-
return std::filesystem::remove(p);
374+
if (std::filesystem::exists(p))
375+
return std::filesystem::remove(p);
376+
else
377+
return false;
375378
}
376379

377380
bool moveFileOrDirectory(const system::path oldPath, const system::path newPath)

0 commit comments

Comments
 (0)