ruarai / CompilePal

A tool to assist in the compiling of source engine maps
GNU General Public License v3.0
220 stars 25 forks source link

Fixed !CompilePal::IncludeDirectory skipping folders with matching internal names #235

Closed Lizard-Of-Oz closed 3 months ago

Lizard-Of-Oz commented 3 months ago

When packing custom files, It's possible to end up with multiple folders with matching internal names (but with different contents) by having them inside separate sourceDir's. Because in most cases CompilePal packs files in on a per-file basis, it usually doesn't cause any problems.

The exception being !CompilePal::IncludeDirectory which includes the whole directory, and the desired action would be the merge of the contents of both folders, rather than just choosing one like with the duplicate files (which is what CompilePal currently does).

To make a point that structuring folders like this isn't unusual, this and this both have their models at models/props_foliage, but since it's just models rather than vscript packages, they don't run into this problem, while two vscript asset packs would.

In my particular case, I'm making "VSH modules" which add extra files to the shared VS Saxton Hale package.