Sorcerer's Tower

expandPath bug in CF8

I've just encountered a very annoying bug with the expandPath function in CF8.

Take the following code:

<cfset MyDir = "."/>

<cfloop index="i" from="1" to="5">
    <cfset MyDir = expandPath(MyDir)/>

Run the code through Railo and you will get exactly the right behaviour, with the current directory output five times:


Now go run the same code with CF8 - and this is what you get:


It simply stacks the current directory onto the front each time. Very frustrating.

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).

<cfif isDefined('Server.ColdFusion.ProductName')
    AND Server.ColdFusion.ProductName EQ 'ColdFusion Server'
    AND ListLen( MyDir ,':') GT 2>
    <cfset MyDir = REreplace( MyDir , "^.*([A-Z]:[^:]+)$" , "\1" )/>

Railo goes Open Source with (Update)

As promised previously, here is a more detailed entry on the announcement to Open Source the Railo CFML engine.

Scotch on the Rocks 2008

Scotch on the Rocks 2008 is now unfortunately ended, read on to see my thoughts.

Railo goes Open Source with

Today at the midday Scotch keynote, Gert Franz and Luc Texier made an impressive announcement: Railo is going completely Open Source.

This is an exciting move both for Railo and for the CFML community as a whole, and I'll be writing more details about it later, but for now here some some quick key details...

There will be two editions of Railo, with the Community and Professional editions combining into one, and the Enterprise edition being the other:

The new Community+Professional edition will be Open Source and there will be no limit to the number of web contexts allowed.

The Enterprise edition will have added value features, including tools from Intergral.

The license will be LGPL2, which means you can distribute Railo along with commercial software.

The timeline for release of the source code is mid to late October, around the time that Railo 3.1 is due for release.

The announcement is online at the JBoss website at

More Information available: Railo goes Open Source with (Update)

International Regular Expressions Day!

Today, 1st June 2008, has been officially decreed as Regular Expressions Day.

And in honour of this event, there are a couple of regex-oriented competitions happening.

Ben Nadel, nominator of this great day, kicked things off with a handful of prizes for the best comments: June 1st 2008 - National Regular Expression Day!

The deadline for Ben's competition is today - that is, you must post the comment on (or before) RegExp Day, and the winners will be selected tomorrow.

Don't despair if you miss that though, as Steve Levithan also has a regular expression competition running, and the deadline for that is Friday 13th, almost two weeks from now: Regex Day Contest

Happy RegEx Day!