Changeset 117 for trunk/bin/Parameter.cc
- Timestamp:
- Jun 30, 2006, 2:46:22 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r116 r117 85 85 { 86 86 87 // making root absolute 88 std::string workdir(pwd()); 89 chdir(root_.c_str()); 90 root_ = pwd(); 91 // remove trailing '/' 92 if (*root_.rbegin()=='/') 93 root_.erase(root_.begin()+root_.size()-1); 94 chdir(workdir.c_str()); 95 96 // making targetdir absolute 97 chdir(targetdir_.c_str()); 98 targetdir_ = pwd(); 99 // remove trailing '/' 100 if (*targetdir_.rbegin()=='/') 101 root_.erase(targetdir_.begin()+targetdir_.size()-1); 102 chdir(workdir.c_str()); 103 87 104 struct stat buf; 88 105 // check that root directory exists … … 95 112 ": No such directory."); 96 113 } 97 98 // making root absolute99 std::string workdir(pwd());100 chdir(root_.c_str());101 root_ = pwd();102 // remove trailing '/'103 if (*root_.rbegin()=='/')104 root_.erase(root_.begin()+root_.size()-1);105 106 // making targetdir absolute107 chdir(targetdir_.c_str());108 targetdir_ = pwd();109 // remove trailing '/'110 if (*targetdir_.rbegin()=='/')111 root_.erase(targetdir_.begin()+targetdir_.size()-1);112 113 chdir(workdir.c_str());114 114 115 115 }
Note: See TracChangeset
for help on using the changeset viewer.