Double backslashes and mixed direction slashes in server.coldfusion.rootdir on a CommandBox ACF 2018 server

On my local CommandBox ACF 2018 server, server.coldfusion.rootdir is this:


Are those double backslashes a bug?
Is the one forward slash with the rest backslashes a bug?

CFML doesn’t care about slash direction in paths these days, far as I know, and it’s news to me, but it doesn’t appear to care how many consecutive slashes there are in a path either, tested up to 4.

For now I’m not going to try to fix paths everywhere that might be affected, but it does seem odd.
Haven’t investigated Lucee, or other ACF versions yet, just ran into this.

Hi Dave, I have no clue where ColdFusion gets the value from that it uses for server.coldfusion.rootdir. CF has always been very liberal in what it accepts for file paths when it comes to direction of slashes and even extra slashes. We’d have to track down how CF calculates that path and see if it’s getting put in a config file like web.xml that way. If it’s not hurting anything, I wouldn’t really worry about it, but you’re more than welcome to try and track down the source.

I just fired up a 2018 server and I see what you’re seeing in the server scope, but it’s interesting that if you view the information tab of the CF
admin, it shows all the paths correctly there. They probably canonicalize all the paths before outputting them.

getCanonicalPath( server.coldfusion.rootdir )

I think I found the culprit for what it’s worth. In Runwar, all init params that have web-inf are replaced using some java regex with the full path to the folder and that find/replace seems to have the slashes doubled. I have a good feeling that is the source of the paths with extra slashes that Adobe is picking up. I actually dislike that replacing behavior for other reasons and have had a ticket in for a while to just stop doing it.

Thanks for the legwork Brad, good work. Glad on some levels that it’s not CommandBox, but if it was it’s be more likely to get fixed fairly quickly :slight_smile:

But you’re right, it’s not causing trouble far as I saw, so no great tragedy.

Thanks again,