+ const Component *comp = target.get_component();
+ unsigned overlay_depth = 0;
+ if(comp && !comp->get_overlays().empty())
+ {
+ const Component::OverlayList &overlays = comp->get_overlays();
+ string last_dir = FS::basename(FS::dirname(target.get_path()));
+ for(Component::OverlayList::const_iterator i=overlays.begin(); i!=overlays.end(); ++i)
+ if(last_dir==*i)
+ overlay_depth = 1;
+ }
+