Make sure the path given to perl_script_load_file is a file.

This commit is contained in:
LemonBoy 2016-07-12 13:32:08 +02:00
commit b87c7b31d5

View file

@ -293,6 +293,9 @@ PERL_SCRIPT_REC *perl_script_load_file(const char *path)
g_return_val_if_fail(path != NULL, NULL);
if (g_file_test(path, G_FILE_TEST_IS_REGULAR) == FALSE)
return NULL;
name = script_file_get_name(path);
return script_load(name, path, NULL);
}