Enhancement - Path, File, Directory integration

- Replaced all access calls.
- Replaced all stat calls.
- Obsoleted util.cpp isAbsoluteDirectory calls.
- Obsoleted util.cpp expandPath calls.
This commit is contained in:
Paul Beckingham
2010-01-16 10:27:31 -05:00
parent 8e47342a18
commit b596e96b43
9 changed files with 66 additions and 120 deletions

View File

@@ -37,6 +37,7 @@
#include <time.h>
#include "Permission.h"
#include "Directory.h"
#include "text.h"
#include "util.h"
#include "main.h"
@@ -619,12 +620,14 @@ int handleConfig (std::string &outs)
}
else
{
if (context.config.get ("data.location") == "")
Directory location (context.config.get ("data.location"));
if (location.data == "")
out << "Configuration error: data.location not specified in .taskrc "
"file."
<< std::endl;
if (access (expandPath (context.config.get ("data.location")).c_str (), X_OK))
if (! location.exists ())
out << "Configuration error: data.location contains a directory name"
" that doesn't exist, or is unreadable."
<< std::endl;