File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change 2727#include " ../common/classes/init.h"
2828#include " ../common/dllinst.h"
2929#include " ../common/os/fbsyslog.h"
30+ #include " ../common/os/path_utils.h"
3031#include " ../common/utils_proto.h"
3132#include " ../jrd/constants.h"
3233#include " firebird/Interface.h"
@@ -60,22 +61,17 @@ class ConfigImpl : public Firebird::PermanentStorage
6061 explicit ConfigImpl (Firebird::MemoryPool& p)
6162 : Firebird::PermanentStorage(p), missConf(false )
6263 {
63- try
64+ const auto fullName = fb_utils::getPrefix (Firebird::IConfigManager::DIR_CONF, Firebird::CONFIG_FILE);
65+ missConf = !PathUtils::canAccess (fullName, 0 );
66+
67+ if (missConf)
6468 {
65- ConfigFile file (fb_utils::getPrefix (Firebird::IConfigManager::DIR_CONF, Firebird::CONFIG_FILE),
66- ConfigFile::ERROR_WHEN_MISS);
69+ ConfigFile file (ConfigFile::USE_TEXT, " " );
6770 defaultConfig = FB_NEW Firebird::Config (file);
6871 }
69- catch ( const Firebird::status_exception& ex)
72+ else
7073 {
71- if (ex.value ()[1 ] != isc_miss_config)
72- {
73- throw ;
74- }
75-
76- missConf = true ;
77-
78- ConfigFile file (ConfigFile::USE_TEXT, " " );
74+ ConfigFile file (fullName, ConfigFile::ERROR_WHEN_MISS);
7975 defaultConfig = FB_NEW Firebird::Config (file);
8076 }
8177 }
You can’t perform that action at this time.
0 commit comments