modules: fix g_file_test for regular files
From the g_file_test documentation: "For example, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) will return TRUE if the file exists; the check whether it's a directory doesn't matter since the existence test is TRUE. With the current set of available tests, there's no point passing in more than one test at a time."
This commit is contained in:

committed by
George Kiagiadakis

parent
2792cecbcf
commit
1132b37f0b
@@ -95,7 +95,7 @@ wp_lua_scripting_load_configuration (const gchar * conf_file,
|
||||
|
||||
/* load conf_file itself */
|
||||
path = g_build_filename (wp_get_config_dir (), conf_file, NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
|
||||
if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) {
|
||||
wp_info ("loading config file: %s", path);
|
||||
if (!wplua_load_path (L, path, 0, 0, error))
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user