Browse Source

- bugfix, only report files (and not dirs) in get_all_xxxx_paths()

master
parent
commit
da42ffd98e
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/lib/payload.cpp

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

@ -32,7 +32,9 @@ list<string> Payload::get_all_relative_paths() {
Payload::scan_dir_recursively( directory, paths);
list<fs::path>::iterator i;
for (i=paths.begin(); i!= paths.end(); i++) {
strpaths.push_back( (*i).relative_path().string() );
if (fs::is_regular_file( *i )) {
strpaths.push_back( (*i).relative_path().string() );
}
}
return strpaths;
}
@ -44,7 +46,9 @@ list<string> Payload::get_all_absolute_paths() {
Payload::scan_dir_recursively( directory, paths);
list<fs::path>::iterator i;
for (i=paths.begin(); i!= paths.end(); i++) {
strpaths.push_back( (*i).string() );
if (fs::is_regular_file( *i )) {
strpaths.push_back( (*i).string() );
}
}
return strpaths;
}


Loading…
Cancel
Save