r9183@datura: manu | 2008-06-04 09:59:07 +0200
[manu/suphp.git] / src / API_Linux.cpp
index a504603..97c1e90 100644 (file)
@@ -225,10 +225,10 @@ std::string suPHP::API_Linux::GroupInfo_getGroupname(const GroupInfo& ginfo)
 
 bool suPHP::API_Linux::File_exists(const File& file) const {
     struct stat dummy;
-    if (::lstat(file.getPath().c_str(), &dummy) == 0)
-        return true;
+    if (::stat(file.getPath().c_str(), &dummy) == 0)
+       return true;
     else
-        return false;
+       return false;
 }
 
 std::string suPHP::API_Linux::File_getRealPath(const File& file) const
@@ -304,7 +304,7 @@ std::string suPHP::API_Linux::File_getRealPath(const File& file) const
 bool suPHP::API_Linux::File_hasPermissionBit(const File& file, FileMode perm) 
     const throw (SystemException) {
     struct stat temp;
-    if (lstat(file.getPath().c_str(), &temp) == -1) {
+    if (stat(file.getPath().c_str(), &temp) == -1) {
        throw SystemException(std::string("Could not stat \"")
                              + file.getPath() + "\": "
                              + ::strerror(errno), __FILE__, __LINE__);
@@ -362,7 +362,7 @@ bool suPHP::API_Linux::File_hasPermissionBit(const File& file, FileMode perm)
 UserInfo suPHP::API_Linux::File_getUser(const File& file) const
     throw (SystemException) {
     struct stat temp;
-    if (lstat(file.getPath().c_str(), &temp) == -1) {
+    if (stat(file.getPath().c_str(), &temp) == -1) {
        throw SystemException(std::string("Could not stat \"")
                              + file.getPath() + "\": "
                              + ::strerror(errno), __FILE__, __LINE__);
@@ -373,7 +373,7 @@ UserInfo suPHP::API_Linux::File_getUser(const File& file) const
 GroupInfo suPHP::API_Linux::File_getGroup(const File& file) const
     throw (SystemException) {
     struct stat temp;
-    if (lstat(file.getPath().c_str(), &temp) == -1) {
+    if (stat(file.getPath().c_str(), &temp) == -1) {
        throw SystemException(std::string("Could not stat \"")
                              + file.getPath() + "\": "
                              + ::strerror(errno), __FILE__, __LINE__);
@@ -382,11 +382,6 @@ GroupInfo suPHP::API_Linux::File_getGroup(const File& file) const
 }
 
 
-bool suPHP::API_Linux::File_isSymlink(const File& file) const throw (SystemException) {
-    return this->isSymlink(file.getPath());
-}
-
-
 void suPHP::API_Linux::execute(std::string program, const CommandLine& cline,
                               const Environment& env) const
     throw (SystemException) {