Skip to content

Commit

Permalink
invert order of package type detection (dry before wet) (ros-infrastr…
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Mar 12, 2013
1 parent dd01741 commit 3291e80
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/rospack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,17 +1360,21 @@ Rosstackage::addStackage(const std::string& path)
#endif

Stackage* stackage = 0;
fs::path dry_manifest_path = fs::path(path) / manifest_name_;
fs::path wet_manifest_path = fs::path(path) / ROSPACKAGE_MANIFEST_NAME;
if(fs::is_regular_file(wet_manifest_path))
if(fs::is_regular_file(dry_manifest_path))
{
stackage = new Stackage(name, path, dry_manifest_path.string(), manifest_name_);
}
else if(fs::is_regular_file(wet_manifest_path))
{
stackage = new Stackage(name, path, wet_manifest_path.string(), ROSPACKAGE_MANIFEST_NAME);
loadManifest(stackage);
stackage->update_wet_information();
}
else
{
fs::path manifest_path = fs::path(path) / manifest_name_;
stackage = new Stackage(name, path, manifest_path.string(), manifest_name_);
return;
}

// skip the stackage if it is not of correct type
Expand Down

0 comments on commit 3291e80

Please sign in to comment.