Fix struct-to-string comparison in uploadSavedPage.cfm

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-02-13 07:37:19 -08:00
parent 3df4659830
commit 093a3b8bce

View file

@ -88,33 +88,37 @@
</cfif>
<!--- Priority: index.html at top level, then any index.html, then top-level html, then first found --->
<cfset htmlFile = "">
<cfset foundFile = false>
<cfset htmlFile = {}>
<cfloop array="#htmlFiles#" index="hf">
<cfif lCase(hf.name) EQ "index.html" AND hf.depth EQ 0>
<cfset htmlFile = hf>
<cfset foundFile = true>
<cfbreak>
</cfif>
</cfloop>
<cfif htmlFile EQ "">
<cfif NOT foundFile>
<cfloop array="#htmlFiles#" index="hf">
<cfif lCase(hf.name) EQ "index.html">
<cfset htmlFile = hf>
<cfset foundFile = true>
<cfbreak>
</cfif>
</cfloop>
</cfif>
<cfif htmlFile EQ "">
<cfif NOT foundFile>
<cfloop array="#htmlFiles#" index="hf">
<cfif hf.depth EQ 0>
<cfset htmlFile = hf>
<cfset foundFile = true>
<cfbreak>
</cfif>
</cfloop>
</cfif>
<cfif htmlFile EQ "">
<cfif NOT foundFile>
<cfset htmlFile = htmlFiles[1]>
</cfif>