- Timestamp:
- Mar 14, 2008, 11:00:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.6-stable/bin/Parameter.cc
r469 r571 128 128 string workdir(pwd()); // remember current working directory (cwd). 129 129 130 bool root_ok = node_exist(root_) && !access_rights(root_, "r"); 131 132 if (root_ok) { 133 // Check that root_ is a directory 134 struct stat nodestat; 135 stat(root_.c_str(), &nodestat); 136 if (!S_ISDIR(nodestat.st_mode)) 137 throw runtime_error(string("svndigest: accessing `") + root_ + 138 "': Not a directory."); 139 } 140 130 141 // Checking that root_ exists and retrieve the absolute path to root_ 131 if ( chdir(root_.c_str()))142 if (!root_ok || chdir(root_.c_str())) 132 143 throw runtime_error(string("svndigest: Root directory (") + root_ + 133 144 ") access failed."); 134 145 root_ = pwd(); 146 147 135 148 136 149 // need to get back to cwd if relative paths are used.
Note: See TracChangeset
for help on using the changeset viewer.