Fixed
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Brad Wood
Brad WoodLabels
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
Sprint
None
Priority
Created 8 March 2018 at 07:00
Updated 26 March 2025 at 17:35
Resolved 6 April 2018 at 17:31
When there is a CF mapping called "/' which points to a drive root, other mappings do not work if they match the names of real folders in the drive root pointed to by the "/" mapping.
mappings = getApplicationSettings().mappings; // BROKEN BEHAVIOR ONLY EXISTS IF "/" MAPPING IS PRESENT mappings[ '/' ] = 'D:/'; // This folder actually exists mappings[ '/commandboxInstall' ] = 'D:\artifacts'; application action="update" mappings="#mappings#"; writeDump( getApplicationSettings().mappings ); // This outputs correctly as "D:\" echo( "expandPath( '/' )" ); writeDump( expandPath( '/' ) ); // Expanding just the mapping correctly outputs "D:\artifacts\" echo( "expandPath( '/commandboxInstall/' )" ); writeDump( expandPath( '/commandboxInstall/' ) ); // Adding non-existent folder still correctly oututs "D:\artifacts\sdfsdf" echo( "expandPath( '/commandboxInstall/sdfsdf' )" ); writeDump( expandPath( '/commandboxInstall/sdfsdf' ) ); // Incorrectly outputs "D:\commandboxInstall\bar" which ignores the mapping // Note this only breaks if there actually is a real folder called "D:\commandboxInstall\bar"!! echo( "expandPath( '/commandboxInstall/bar' )" ); writeDump( expandPath( '/commandboxInstall/bar' ) );
Update:
The resolution of this ticket was to add a new system property called lucee.mapping.first that you can set to true that should favor a mapping over a physical directory.