Allow initially missing application defined mapping physical paths to be re-checked

Description

When an application first starts, any mappings defined in application.cfc are checked to make sure the physical path exists. If not, the mapping defaults to a path below the web/application root. For example:

If "c:\test" doesn't exist then the mapping will resolve to "(webroot path)\test" wherever that might be.

If I then create "c:\test" after the application has started, the mapping will not be updated even if I restart the application. Instead it will continue to resolve to "(webroot path)\test" until Lucee is restarted. In other words the initial resolution appears to be cached for the life of the server.

To avoid a disruptive restart, it would be useful to be able to programmatically force the physical paths of application defined mappings to be re-checked at runtime.

The following currently unsupported code will achieve this:

See this forum thread for more details

Activity

Show:
Pothys - MitrahSoft
October 16, 2020, 4:20 PM
Edited

I've checked this ticket and confirmed the issue happened on lucee latest version 5.3.8.82-SNAPSHOT also. While starting the application, if the application-defined mapping path doesn't exist means it defaults to the webroot path. After creating the path means it doesn't take that path it still takes the webroot path. But ACF works as expected.
Also, I've added a fix for this ticket

Pull Request: https://github.com/lucee/Lucee/pull/1074

Julian Halliwell
7 days ago

Thank you

Assignee

Michael Offner

Reporter

Julian Halliwell

Labels

None

Priority

New
Configure