Ignore:
Timestamp:
Nov 2, 2010, 1:46:21 AM (11 years ago)
Author:
Peter Johansson
Message:

merge release 0.8.1 into trunk. Delta 0.8.1 - 0.8

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/bin/Parameter.cc

    r1241 r1264  
    9191      check_readable(root_.value());
    9292      check_is_dir(root_.value());
     93
    9394      chdir(root_.value());
    94       root_.value(pwd());
     95      root_full_ = pwd();
    9596      chdir(save_wd);
     97
     98      // take care of when root is a symlink (see ticket #477)
     99      struct stat stats;
     100      lstat(root_.value().c_str(), &stats);
     101      if (S_ISLNK(stats.st_mode))
     102        root_basename_ = file_name(root_.value());
     103      else
     104        root_basename_ = file_name(root_full_);
    96105    }
    97106
     
    190199  std::string Parameter::root(void) const
    191200  {
    192     return root_.value();
    193   }
     201    return root_full_;
     202  }
     203
     204
     205  const std::string& Parameter::root_basename(void) const
     206  {
     207    assert(root_basename_.size());
     208    return root_basename_;
     209  }
     210
    194211
    195212  void Parameter::set_default(void)
Note: See TracChangeset for help on using the changeset viewer.