diff --git a/custom/default-cfconfig/.CFConfig-empty.json b/custom/default-cfconfig/.CFConfig-empty.json index 9e26dfe..2482443 100644 --- a/custom/default-cfconfig/.CFConfig-empty.json +++ b/custom/default-cfconfig/.CFConfig-empty.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "mode":"single" +} \ No newline at end of file diff --git a/custom/default-cfconfig/compareDefault.cfm b/custom/default-cfconfig/compareDefault.cfm index 1d7a397..b08b046 100644 --- a/custom/default-cfconfig/compareDefault.cfm +++ b/custom/default-cfconfig/compareDefault.cfm @@ -1,9 +1,28 @@ default = deserializeJSON( fileRead( expandPath( "./.CFConfig-default.json" ) ) ); contextFiles = directoryList( path=Expandpath( "{lucee-config}" ), recurse=true ); - for ( cf in contextFiles ) - systemOutput( cf, true ); - empty = deserializeJSON( fileRead( expandPath( '{lucee-config}.CFConfig.json' ) ) ); + cfgPAth = expandPath( '{lucee-config}.CFConfig.json' ); + if ( !fileExists( cfgPath ) ){ + for ( cf in contextFiles ) { + systemOutput( cf, true ); + } + log = expandPath( '{lucee-config}/logs/out.log' ); + if ( !fileExists( log ) ){ + systemOutput( "" ): + systemOutput( "--------- out.log-----------" ): + systemOutput( fileRead( log ) ): + } + errlog = expandPath( '{lucee-config}/logs/err.log' ); + if ( !fileExists( errlog ) ){ + systemOutput( "" ): + systemOutput( "--------- err.log-----------" ): + systemOutput( fileRead( errlog ) ): + } + + throw "missing .CFConfig.json [#cfgPath#]"; + } + + empty = deserializeJSON( fileRead( cfgPath ) ); ignore = [ "salt", "hspw" ]; problems = 0;