linux - Directory does not exist, but clearly does -
i working on old coldfusion 11 application company , error stumping me. there following check inside .cfm
:
<cffunction name="init"> <cfargument name="searchdir" required="yes" default="#replace(getdirectoryfrompath(getcurrenttemplatepath()),'/services','')#xml/"> <cfargument name="checkoutmode" required="no" default="protect"> <!--- library variables initialization ---> <cfset variables.libbasedir = arguments.searchdir> <cfset variables.libcheckoutmode = arguments.checkoutmode> <cfif not directoryexists(variables.libbasedir)> <cfthrow message="the base document directory '#variables.libbasedir#' not exist!"> </cfif> .... </cffunction>
variable.libbasedir
printed in error message as:
/opt/app/coldfusion/coldfusion11/cfusion/wwwroot/<some-app>/xml/
but directory follows (used pwd
):
/opt/app/coldfusion/coldfusion11/cfusion/wwwroot/<some-app>/xml
this works on windows server, not linux, sole purpose of doing this.
any ideas why throw error, thanks.
here ended using because "/" continued appended end of path no matter did.
<cfargument name="searchdir" required="yes" default="#replace(getdirectoryfrompath(getcurrenttemplatepath()),'services/','xml')#"> <cfset variables.libbasedir = left(arguments.searchdir, len(arguments.searchdir)-1)>
so removed "/" @ end of path , fixed it.
thanks previous suggestions.