Skip to content

Commit

Permalink
[hlc] prevent recursive template/code copy
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Oct 25, 2024
1 parent e8c9014 commit 812a3e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion other/haxelib/Run.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ class Build {
if( !sys.FileSystem.exists(srcDir) )
throw "Failed to find make template '"+tpl+"'";
}

if( StringTools.contains(sys.FileSystem.absolutePath(targetDir), sys.FileSystem.absolutePath(srcDir)) ) {
throw "Template "+tpl+" contains "+targetDir+", can cause recursive generation";
}

var allFiles = config.files.copy();
for( f in config.files )
if( StringTools.endsWith(f,".c") ) {
Expand Down

0 comments on commit 812a3e4

Please sign in to comment.