Browse Source

- bugfix, the base dir in constructor should be the base dir of the bagit

master
parent
commit
7956e4240e
2 changed files with 3 additions and 4 deletions
  1. +1
    -2
      src/lib/load_bag.cpp
  2. +2
    -2
      src/lib/payload.cpp

+ 1
- 2
src/lib/load_bag.cpp View File

@ -47,8 +47,7 @@ Bag::Bag( string dfname ) {
Bag::log << "file " << bagit_txt_path << " could not be opened" <<endl;
}
// read in payload
string payloaddir = dfname + "data/";
Bag::payload_p = new Payload( payloaddir ) ;
Bag::payload_p = new Payload( dfname ) ;
list<string> files = Bag::payload_p->get_all_relative_paths();
// read in payload manifest
Bag::payloadmanifest_p = new Payloadmanifest(dfname);


+ 2
- 2
src/lib/payload.cpp View File

@ -9,12 +9,12 @@
namespace fs = boost::filesystem;
using namespace std;
Payload::Payload( string basedir ) {
fs::path p{ basedir };
this->basedir = basedir + "data/";
fs::path p{ this->basedir };
fs::file_status s = fs::status( p );
// cout << "basedir "<< p.string() << endl;
// cout << "is dir: "<< fs::is_directory( s) << endl;
// cout << "exists: "<< fs::exists(s) << endl;
this->basedir = basedir;
};
void Payload::scan_dir_recursively( fs::path directory, list<fs::path> &paths) {


Loading…
Cancel
Save