Changeset 1073
- Timestamp:
- Jun 6, 2010, 6:13:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/svndigest.cc
r1072 r1073 93 93 Configuration& config = Configuration::instance(); 94 94 95 // check if target already exists and behave appropriately96 bool need_to_erase_target=false;97 std::string target_path=option.targetdir() + '/' + file_name(option.root());98 if (option.report()) {99 if (option.verbose())100 std::cout << "Checking target directory" << std::endl;101 need_to_erase_target = node_exist(target_path);102 if (need_to_erase_target && !option.force()) {103 std::cerr << "svndigest: directory `"104 << target_path << "' already exists\n";105 exit(EXIT_FAILURE);106 }107 }108 109 95 // Extract repository location 110 96 std::string repo; … … 143 129 if (option.report()) { 144 130 // remove target if needed 145 if (need_to_erase_target) { 131 std::string target_path = concatenate_path(option.targetdir(), 132 file_name(option.root())); 133 if (node_exist(target_path)) { 134 assert(option.force()); 146 135 if (option.verbose()) 147 136 std::cout << "Removing old target tree: " << target_path << "\n";
Note: See TracChangeset
for help on using the changeset viewer.