Changeset 1073 for trunk/bin


Ignore:
Timestamp:
Jun 6, 2010, 6:13:22 AM (11 years ago)
Author:
Peter Johansson
Message:

remove check that is already done in Parameter class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/svndigest.cc

    r1072 r1073  
    9393  Configuration& config = Configuration::instance();
    9494
    95   // check if target already exists and behave appropriately
    96   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 
    10995  // Extract repository location
    11096  std::string repo;
     
    143129  if (option.report()) {
    144130    // 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());
    146135      if (option.verbose())
    147136        std::cout << "Removing old target tree: " << target_path << "\n";
Note: See TracChangeset for help on using the changeset viewer.