getDirectoryFromPath returns different result to Lucee and ACF

Description

Found whilst trying to run a FW1 app.

Example code: Application.cfc

Lucee (and ACF) prints out:

string /

BoxLang prints out:

String [52]: /Users/johnwhish/projects/jericho/fw1gettingstarted/

For reference, this where the issue occurs in FW1 which prevents it finding views and controllers

Activity

Show:

Brad Wood January 28, 2025 at 10:52 PM

Ok, this BIF should be returned to its former glory.

Brad Wood January 28, 2025 at 10:45 PM

Ahh, looks like it fell victim to this commit

which was a mostly-blind pass over every file system related BIF to expand all their inputs. I think this logic was just added in error in this specific BIF’s case. cc/

Brad Wood January 28, 2025 at 10:43 PM
Edited

Ooh, tricky. I’m a little confused here since I thought that function was only ever used on absolute paths! Our Java implementation of this BIF starts with this code

which explicitly expands it! I’ll have to try and remember why we were doing that and figure out what may break when I remove it.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created January 28, 2025 at 9:15 PM
Updated January 28, 2025 at 10:52 PM
Resolved January 28, 2025 at 10:52 PM
Loading...