Minor optimization: use two-way IF instead of separate ones.

This commit is contained in:
Stephen Anthony 2018-08-06 12:30:00 -02:30
parent 24bb06e8b1
commit 0b04b130f9
1 changed files with 2 additions and 3 deletions

View File

@ -59,12 +59,11 @@ FilesystemNodePOSIX::FilesystemNodePOSIX(const string& p, bool verify)
if(_path[0] == '~')
{
const char* home = getenv("HOME");
if (home != nullptr)
if(home != nullptr)
_path.replace(0, 1, home);
}
// Get absolute path (only used for relative directories)
if(_path[0] == '.')
else if(_path[0] == '.')
{
char buf[MAXPATHLEN];
if(realpath(_path.c_str(), buf))