Fix resources break

This commit is contained in:
schellap 2016-05-22 17:18:14 -07:00 committed by Senthil
parent c037cf321e
commit 05e1d95b14

View file

@ -62,6 +62,20 @@ bool deps_entry_t::to_path(const pal::string_t& base, bool look_in_base, pal::st
//
bool deps_entry_t::to_dir_path(const pal::string_t& base, pal::string_t* str) const
{
if (asset_type == asset_types::resources)
{
pal::string_t pal_relative_path = relative_path;
if (_X('/') != DIR_SEPARATOR)
{
replace_char(&pal_relative_path, _X('/'), DIR_SEPARATOR);
}
pal::string_t ietf_dir = get_directory(pal_relative_path);
pal::string_t ietf = get_filename(ietf_dir);
pal::string_t base_ietf_dir = base;
append_path(&base_ietf_dir, ietf.c_str());
trace::verbose(_X("Detected a resource asset, will query dir/ietf-tag/resource base: %s asset: %s"), base_ietf_dir.c_str(), asset_name.c_str());
return to_path(base_ietf_dir, true, str);
}
return to_path(base, true, str);
}
// -----------------------------------------------------------------------------