Skip to content

Commit 571ddaf

Browse files
author
Andrey Kravchenko
committed
Corrections after Dmitry Yemanov review
Fix opening a file if it is specified in absolute path Also fix the error message if there are not enough permissions to open the file
1 parent 18b7a7c commit 571ddaf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/jrd/replication/Config.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,10 @@ Config* Config::get(const PathName& lookupName)
246246
}
247247
else if (key_source.equals(KEY_FILE))
248248
{
249-
const PathName sub_filename =
250-
fb_utils::getPrefix(IConfigManager::DIR_CONF, sub_value.c_str());
251-
249+
const PathName sub_filename = sub_value.c_str();
252250
AutoPtr<FILE> file(os_utils::fopen(sub_filename.c_str(), "rt"));
253251
if (!file)
254-
configError("missing file", value, sub_filename.c_str());
252+
configError("missing or inaccessible file", value, sub_filename.c_str());
255253

256254
// skip first empty lines
257255
sub_value = "";

0 commit comments

Comments
 (0)