Changeset 117
- Timestamp:
- Jun 30, 2006, 2:46:22 PM (16 years ago)
- Location:
- trunk/bin
- Files:
-
- 2 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 } -
trunk/bin/svnstat.cc
r112 r117 64 64 std::string root_path(option->targetdir()+'/'+file_name(option->root())); 65 65 struct stat buf; 66 if (!stat(root_path.c_str(),&buf)) 66 if (!stat(root_path.c_str(),&buf)){ 67 if (option->verbose()) 68 std::cout << "rm -rf " << root_path << "\n"; 67 69 rmdirhier(root_path); 70 } 68 71 } 69 72 else {
Note: See TracChangeset
for help on using the changeset viewer.