SGPath: typo...

This commit is contained in:
Thomas Geymayer
2014-01-28 00:34:21 +01:00
parent 0d19be2196
commit c54b1e037a
3 changed files with 17 additions and 17 deletions

View File

@@ -192,12 +192,12 @@ int main(int argc, char* argv[])
pp.append("./test-dir/file.txt");
COMPARE(pp.create_dir(0700), -3);
pp.setPermissonChecker(&validateRead);
pp.setPermissionChecker(&validateRead);
COMPARE(pp.canRead(), true);
COMPARE(pp.canWrite(), false);
COMPARE(pp.create_dir(0700), -3);
pp.setPermissonChecker(&validateWrite);
pp.setPermissionChecker(&validateWrite);
COMPARE(pp.canRead(), false);
COMPARE(pp.canWrite(), true);

View File

@@ -75,7 +75,7 @@ static SGPath pathForCSIDL(int csidl, const SGPath& def)
char path[MAX_PATH];
if (SHGetSpecialFolderPath(0, path, csidl, false)) {
return SGPath(path, def.getPermissonChecker());
return SGPath(path, def.getPermissionChecker());
}
return def;
@@ -95,7 +95,7 @@ static SGPath appleSpecialFolder(OSType type, const SGPath& def)
if( FSRefMakePath(&ref, path, 1024) != noErr )
return def;
return SGPath((const char*) path, def.getPermissonChecker());
return SGPath((const char*) path, def.getPermissionChecker());
}
#else
static SGPath getXDGDir( const std::string& name,
@@ -131,7 +131,7 @@ static SGPath getXDGDir( const std::string& name,
return SGPath::home(def)
/ simgear::strutils::unescape(line.substr(HOME.length()));
return SGPath(line, def.getPermissonChecker());
return SGPath(line, def.getPermissionChecker());
}
if( def.isNull() )
@@ -160,7 +160,7 @@ SGPath::fix()
// default constructor
SGPath::SGPath(PermissonChecker validator)
SGPath::SGPath(PermissionChecker validator)
: path(""),
_permission_checker(validator),
_cached(false),
@@ -171,7 +171,7 @@ SGPath::SGPath(PermissonChecker validator)
// create a path based on "path"
SGPath::SGPath( const std::string& p, PermissonChecker validator )
SGPath::SGPath( const std::string& p, PermissionChecker validator )
: path(p),
_permission_checker(validator),
_cached(false),
@@ -184,7 +184,7 @@ SGPath::SGPath( const std::string& p, PermissonChecker validator )
// create a path based on "path" and a "subpath"
SGPath::SGPath( const SGPath& p,
const std::string& r,
PermissonChecker validator )
PermissionChecker validator )
: path(p.path),
_permission_checker(validator),
_cached(false),
@@ -240,14 +240,14 @@ void SGPath::set( const string& p ) {
}
//------------------------------------------------------------------------------
void SGPath::setPermissonChecker(PermissonChecker validator)
void SGPath::setPermissionChecker(PermissionChecker validator)
{
_permission_checker = validator;
_rwCached = false;
}
//------------------------------------------------------------------------------
SGPath::PermissonChecker SGPath::getPermissonChecker() const
SGPath::PermissionChecker SGPath::getPermissionChecker() const
{
return _permission_checker;
}

View File

@@ -57,10 +57,10 @@ public:
bool read : 1;
bool write : 1;
};
typedef Permissions (*PermissonChecker)(const SGPath&);
typedef Permissions (*PermissionChecker)(const SGPath&);
/** Default constructor */
explicit SGPath(PermissonChecker validator = NULL);
explicit SGPath(PermissionChecker validator = NULL);
/** Copy contructor */
SGPath(const SGPath& p);
@@ -71,7 +71,7 @@ public:
* Construct a path based on the starting path provided.
* @param p initial path
*/
SGPath( const std::string& p, PermissonChecker validator = NULL );
SGPath( const std::string& p, PermissionChecker validator = NULL );
/**
* Construct a path based on the starting path provided and a relative subpath
@@ -80,7 +80,7 @@ public:
*/
SGPath( const SGPath& p,
const std::string& r,
PermissonChecker validator = NULL );
PermissionChecker validator = NULL );
/** Destructor */
~SGPath();
@@ -95,8 +95,8 @@ public:
bool operator==(const SGPath& other) const;
bool operator!=(const SGPath& other) const;
void setPermissonChecker(PermissonChecker validator);
PermissonChecker getPermissonChecker() const;
void setPermissionChecker(PermissionChecker validator);
PermissionChecker getPermissionChecker() const;
/**
* Set if file information (exists, type, mod-time) is cached or
@@ -301,7 +301,7 @@ private:
void checkAccess() const;
std::string path;
PermissonChecker _permission_checker;
PermissionChecker _permission_checker;
mutable bool _cached : 1;
mutable bool _rwCached : 1;