+ FS::Path subdir;
+ string base;
+ if(processing_unit==COMPONENT)
+ base = comp->get_name();
+ else
+ {
+ subdir = FS::dirname(FS::relative(tmpl.get_path(), pkg->get_source_directory()));
+ if(processing_unit==ONE_FILE)
+ base = FS::basepart(FS::basename(tmpl.get_path()));
+ else if(processing_unit==DIRECTORY)
+ {
+ base = FS::basename(subdir);
+ subdir = FS::dirname(subdir);
+ }
+ }