Prevent config window from crashing with directory loaded

This commit is contained in:
spherallic 2023-04-03 21:46:51 +02:00
parent 502308d1bc
commit 7243994446

View file

@ -141,7 +141,8 @@ namespace CodeImp.DoomBuilder
// Location not included? // Location not included?
if(!dl.notfortesting) if(!dl.notfortesting)
{ {
if (FilesAreEqual(fi, new FileInfo(dl.location))) // hack to prevent another hack from crashing: don't check directories
if (dl.type != DataLocation.RESOURCE_DIRECTORY && FilesAreEqual(fi, new FileInfo(dl.location)))
{ {
outp = outp.Replace("%f", "%F"); outp = outp.Replace("%f", "%F");
outp = outp.Replace("\"%F\"", ""); outp = outp.Replace("\"%F\"", "");