Fixed
Details
Assignee
Michael OffnerMichael OffnerReporter
Dan Switzer, IIDan Switzer, IIPriority
NewLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Dan Switzer, II
Dan Switzer, IIPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Created 5 March 2016 at 19:28
Updated 31 January 2025 at 15:00
Resolved 15 April 2016 at 14:41
If you declare an application mapping of "/" the behavior of fileExists() doesn't work as expected. The issue appears to be in how allowRealPath argument works.
I've attached a very simple use case that shows the problem.
When the Application.cfc has the following line:
this.mappings["/"] = getDirectoryFromPath(getCurrentTemplatePath());
The behavior of fileExists() is different before the onRequest life cycle and after the life cycle starts.
So, when this mapping exists, fileExists() will start returning false for files that do exist. You can use other file operations (i.e. fileRead()) without any issues.
If the example code in the /www root doesn't work, you can use Brad Wood's vagrant project to spin it up:
https://github.com/Ortus-Solutions/vagrant-centos-lucee
Just unzip this folder to a sibling of the folder vagrant-centos-lucee folder (per the Vagrant instructions).
Let me know if you have any questions. I have not tried this under Lucee 5 yet.