Bugfix: prevent selection of previous file if does not exists anymore.

This commit is contained in:
brunoherbelin
2020-07-13 22:23:29 +02:00
parent c2e4eea7eb
commit 0d6ec67720
2 changed files with 9 additions and 4 deletions

View File

@@ -237,6 +237,9 @@ string SystemToolkit::full_filename(const std::string& path, const string &filen
bool SystemToolkit::file_exists(const string& path)
{
if (path.empty())
return false;
return access(path.c_str(), R_OK) == 0;
// TODO : WIN32 implementation