{"action":"created","issue":{"url":"https://api.github.com/repos/framework-one/fw1/issues/336","labels_url":"https://api.github.com/repos/framework-one/fw1/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/framework-one/fw1/issues/336/comments","events_url":"https://api.github.com/repos/framework-one/fw1/issues/336/events","html_url":"https://github.com/framework-one/fw1/issues/336","id":85239084,"number":336,"title":"expandPath() returning invalid directory when a trailing \"/\" is present on ACF11 and FW/1 3.5","user":{"login":"cfchef","id":3632399,"avatar_url":"https://avatars.githubusercontent.com/u/3632399?v=3","gravatar_id":"","url":"https://api.github.com/users/cfchef","html_url":"https://github.com/cfchef","followers_url":"https://api.github.com/users/cfchef/followers","following_url":"https://api.github.com/users/cfchef/following{/other_user}","gists_url":"https://api.github.com/users/cfchef/gists{/gist_id}","starred_url":"https://api.github.com/users/cfchef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfchef/subscriptions","organizations_url":"https://api.github.com/users/cfchef/orgs","repos_url":"https://api.github.com/users/cfchef/repos","events_url":"https://api.github.com/users/cfchef/events{/privacy}","received_events_url":"https://api.github.com/users/cfchef/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/framework-one/fw1/milestones/15","html_url":"https://github.com/framework-one/fw1/milestones/3.5","labels_url":"https://api.github.com/repos/framework-one/fw1/milestones/15/labels","id":950032,"number":15,"title":"3.5","description":"FW/1 and Clojure Sitting in a Tree","creator":{"login":"seancorfield","id":43875,"avatar_url":"https://avatars.githubusercontent.com/u/43875?v=3","gravatar_id":"","url":"https://api.github.com/users/seancorfield","html_url":"https://github.com/seancorfield","followers_url":"https://api.github.com/users/seancorfield/followers","following_url":"https://api.github.com/users/seancorfield/following{/other_user}","gists_url":"https://api.github.com/users/seancorfield/gists{/gist_id}","starred_url":"https://api.github.com/users/seancorfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seancorfield/subscriptions","organizations_url":"https://api.github.com/users/seancorfield/orgs","repos_url":"https://api.github.com/users/seancorfield/repos","events_url":"https://api.github.com/users/seancorfield/events{/privacy}","received_events_url":"https://api.github.com/users/seancorfield/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-01-25T01:44:13Z","updated_at":"2015-06-04T20:33:48Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-06-04T19:21:20Z","updated_at":"2015-06-04T20:33:48Z","closed_at":"2015-06-04T20:33:48Z","body":"This is in reference to this post: https://groups.google.com/d/msg/framework-one/I1FuQupK9_A/UH5au0CpVpEJ\r\n\r\nGiven the code below (found in `ioclj.cfc`: line 181),\r\n\r\nWhen trying to run the FW/1 3.5 example: `6helloclojure`, the variable: `expandedFolder` is returning an invalid directory as `index.cfm` is being appended to the end of the path when `expandPath( folder )` is called. Further investigation is showing that when a trailing `/` is omitted/removed from the path supplied to `expandPath()`, a valid directory path is generated. \r\n\r\n```\r\nprivate string function findProjectFile( array folders ) {\r\n    for ( var folder in folders ) {\r\n        var expandedFolder = expandPath( folder );\r\n        // for ACF11 compatibility, only use expanded path if it exists\r\n        if ( directoryExists( expandedFolder ) ) folder = expandedFolder;\r\n        if ( !directoryExists( folder ) ) continue;\r\n        var path = replace( folder, chr(92), \"/\", \"all\" );\r\n        if ( right( path, 1 ) == \"/\" ) {\r\n            if ( len( path ) == 1 ) path = \"\";\r\n            else path = left( path, len( path ) - 1 );\r\n        }\r\n        if ( fileExists( path & \"/project.clj\" ) ) {\r\n            // found our Clojure project, return it\r\n            if ( variables.debug ) variables.stdout.println( \"ioclj: using #path#/project.clj for Clojure root\" );\r\n            return path;\r\n        }\r\n    }\r\n    throw \"Unable to find project.clj in any of: #arrayToList( folders, ', ' )#\";\r\n}\r\n```\r\n\r\nA potential solution can be found in the link above. At this time, I haven't been able to reproduce a similar scenario with `expandPath()` outside of trying to run the `6helloclojure` example code."},"comment":{"url":"https://api.github.com/repos/framework-one/fw1/issues/comments/109040568","html_url":"https://github.com/framework-one/fw1/issues/336#issuecomment-109040568","issue_url":"https://api.github.com/repos/framework-one/fw1/issues/336","id":109040568,"user":{"login":"seancorfield","id":43875,"avatar_url":"https://avatars.githubusercontent.com/u/43875?v=3","gravatar_id":"","url":"https://api.github.com/users/seancorfield","html_url":"https://github.com/seancorfield","followers_url":"https://api.github.com/users/seancorfield/followers","following_url":"https://api.github.com/users/seancorfield/following{/other_user}","gists_url":"https://api.github.com/users/seancorfield/gists{/gist_id}","starred_url":"https://api.github.com/users/seancorfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seancorfield/subscriptions","organizations_url":"https://api.github.com/users/seancorfield/orgs","repos_url":"https://api.github.com/users/seancorfield/repos","events_url":"https://api.github.com/users/seancorfield/events{/privacy}","received_events_url":"https://api.github.com/users/seancorfield/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T20:33:48Z","updated_at":"2015-06-04T20:33:48Z","body":"Fixed in https://github.com/framework-one/fw1/commit/351c1f3fcce7c7b43e544b92b3074da58894de27 as part of an enhancement to allow arrays of paths as well as lists."}}