More rFile cleanups and fixes.

Was using fileExists/dirExists before when really should have just been exists. File or Dir doesn't matter and would only create false negatives.
Current working directory shouldn't really be used at all. This is just the folder the application is run from (not even where the .exe resides).
Some of the infos required by vfsLocalDir such as executable may not be portable. Not sure of their intended function as they are never used.
This commit is contained in:
Sacha 2014-08-01 04:20:00 +10:00
parent 6cb083be1a
commit e8525a6f14
15 changed files with 180 additions and 132 deletions

View file

@ -63,7 +63,7 @@ bool vfsLocalFile::Create(const std::string& path)
break;
const std::string& dir = path.substr(0, p);
if(!rDirExists(dir))
if(!rExists(dir))
{
LOG_NOTICE(HLE, "create dir: %s", dir.c_str());
rMkdir(dir);
@ -72,7 +72,7 @@ bool vfsLocalFile::Create(const std::string& path)
//create file
const char m = path[path.length() - 1];
if(m != '/' && m != '\\' && !rFileExists(path)) // ???
if(m != '/' && m != '\\' && !rExists(path)) // ???
{
rFile f;
return f.Create(path);
@ -118,5 +118,5 @@ bool vfsLocalFile::IsOpened() const
bool vfsLocalFile::Exists(const std::string& path)
{
return rFileExists(path);
return rExists(path);
}