<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<link rel="self" href="http://www.sorcerers-isle.net/atom.cfm"/>
<link href="http://www.sorcerers-isle.net"/>
<title>Sorcerer&apos;s Isle :: ColdFusion</title>
<subtitle>Welcome to Sorcerer&apos;s Isle, a weblog covering a multitude of topics, ranging from programming to 3D graphics; photography to gadgets; tutorials to tinkering.</subtitle>
<category term="ColdFusion">ColdFusion</category>
<entry>
<title>expandPath bug in CF8</title>
<link href="http://www.sorcerers-isle.net/article/expandpath_bug_in_cf8.html"/>
<summary type="html">&lt;p&gt;I&apos;ve just encountered a very annoying bug with the expandPath function in CF8.&lt;/p&gt;
&lt;p&gt;Take the following code:&lt;/p&gt;
&lt;code class=&quot;block&quot;&gt;&amp;lt;cfset MyDir = &quot;.&quot;/&gt;
&amp;lt;cfloop index=&quot;i&quot; from=&quot;1&quot; to=&quot;5&quot;&gt;
&amp;lt;cfset MyDir = expandPath(MyDir)/&gt;
&amp;lt;cfoutput&gt;&amp;lt;br/&gt;#MyDir#&amp;lt;/cfoutput&gt;
&amp;lt;/cfloop&gt;&lt;/code&gt;
&lt;p&gt;Run the code through Railo and you will get exactly the right behaviour, with the current directory output five times:&lt;/p&gt;
&lt;code class=&quot;block&quot;&gt;C:\dev\scratch
C:\dev\scratch
C:\dev\scratch
C:\dev\scratch
C:\dev\scratch&lt;/code&gt;
&lt;p&gt;Now go run the same code with CF8 - and this is what you get:&lt;/p&gt;
&lt;code class=&quot;block&quot;&gt;F:\ColdFusion8\wwwroot\scratch
F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch
F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch
F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch
F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch\F:\ColdFusion8\wwwroot\scratch&lt;/code&gt;
&lt;p&gt;It simply stacks the current directory onto the front each time. Very frustrating.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;In order to get round this, I created a regular expression to pull off the last value of any directory containing more than one colon - this will work for Windows machines, but may need to be changed for Linux or MacOSX machines (if the bug affects these).&lt;/p&gt;
&lt;code class=&quot;block&quot;&gt;&amp;lt;cfif isDefined(&apos;Server.ColdFusion.ProductName&apos;)
AND Server.ColdFusion.ProductName EQ &apos;ColdFusion Server&apos;
AND ListLen( MyDir ,&apos;:&apos;) GT 2&gt;
&amp;lt;cfset MyDir = REreplace( MyDir , &quot;^.*([A-Z]:[^:]+)$&quot; , &quot;\1&quot; )/&gt;
&amp;lt;/cfif&gt;&lt;/code&gt;</summary>
<updated>2008-08-16T17:23:42Z</updated>
</entry>
<entry>
<title>CFML Engine Comparison</title>
<link href="http://www.sorcerers-isle.net/article/cfml_engine_comparison.html"/>
<summary type="html">&lt;p&gt;I have just published the &lt;a href=&quot;http://www.cfml-engines.info&quot;&gt;CFML Engine Wiki&lt;/a&gt;, a website to compare and detail the features and differences of the top CFML engines.&lt;/p&gt;
&lt;p&gt;There is still a lot of work to be done with it, but with it being a wiki I decided it better to release the URL and allow others to help with doing that.&lt;/p&gt;
&lt;a class=&quot;c&quot; href=&quot;http://www.cfml-engines.info&quot;&gt;www.cfml-engines.info&lt;/a&gt;</summary>
<updated>2008-06-02T09:07:15Z</updated>
</entry>
</feed>
