+#include <msp/core/algorithm.h>
#include <msp/fs/utils.h>
#include "androidassetpackagingtool.h"
#include "androidmanifestfile.h"
else if(real->get_package()==res.get_package())
{
const FS::Path &path = file->get_path();
- resource_dirs.push_back(path.subpath(0, path.size()-2));
+ FS::Path res_dir = path.subpath(0, path.size()-2);
+ if(!any_equals(resource_dirs, res_dir))
+ resource_dirs.push_back(res_dir);
}
}
- set<string> seen_dirs;
for(const FS::Path &d: resource_dirs)
- if(seen_dirs.insert(d.str()).second)
- {
- argv.push_back("-S");
- argv.push_back(FS::relative(d, work_dir).str());
- }
+ {
+ argv.push_back("-S");
+ argv.push_back(FS::relative(d, work_dir).str());
+ }
return new ExternalTask(argv, work_dir);
}