diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-14 16:35:06 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-14 16:35:06 +0200 |
commit | 92940e52f1e30e4021555deefbf16ffd0e318c1b (patch) | |
tree | fed35d6ed59cf2a0ea155bf61ecd1a3e3e9a662d /src/plugins | |
parent | 3379ac47578cbc6fd9e1260ab9a27b84244772b6 (diff) | |
download | weechat-92940e52f1e30e4021555deefbf16ffd0e318c1b.zip |
Do not auto-load hidden files in script plugins (bug #21390)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugin.c | 3 | ||||
-rw-r--r-- | src/plugins/scripts/script.c | 2 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 037bb4f1a..1299e77c9 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -697,6 +697,7 @@ plugin_auto_load () util_exec_on_files ((plugin_path2) ? plugin_path2 : ((plugin_path) ? plugin_path : CONFIG_STRING(config_plugin_path)), + 0, NULL, &plugin_auto_load_file); if (plugin_path) @@ -711,7 +712,7 @@ plugin_auto_load () { snprintf (dir_name, strlen (WEECHAT_LIBDIR) + 16, "%s/plugins", WEECHAT_LIBDIR); - util_exec_on_files (dir_name, NULL, &plugin_auto_load_file); + util_exec_on_files (dir_name, 0, NULL, &plugin_auto_load_file); free (dir_name); } } diff --git a/src/plugins/scripts/script.c b/src/plugins/scripts/script.c index 24f23c3d3..6837b888a 100644 --- a/src/plugins/scripts/script.c +++ b/src/plugins/scripts/script.c @@ -404,7 +404,7 @@ script_auto_load (struct t_weechat_plugin *weechat_plugin, snprintf (dir_name, dir_length, "%s/%s/autoload", dir_home, weechat_plugin->name); - weechat_exec_on_files (dir_name, NULL, callback); + weechat_exec_on_files (dir_name, 0, NULL, callback); free (dir_name); } diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index d921c7371..ea84b1176 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -33,7 +33,7 @@ struct t_infolist; struct t_weelist; /* API version (used to check that plugin has same API and can be loaded) */ -#define WEECHAT_PLUGIN_API_VERSION "20090614-01" +#define WEECHAT_PLUGIN_API_VERSION "20090614-02" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -193,7 +193,7 @@ struct t_weechat_plugin int (*mkdir_home) (const char *directory, int mode); int (*mkdir) (const char *directory, int mode); int (*mkdir_parents) (const char *directory, int mode); - void (*exec_on_files) (const char *directory, void *data, + void (*exec_on_files) (const char *directory, int hidden_files, void *data, void (*callback)(void *data, const char *filename)); /* util */ @@ -751,8 +751,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); weechat_plugin->mkdir(__directory, __mode) #define weechat_mkdir_parents(__directory, __mode) \ weechat_plugin->mkdir_parents(__directory, __mode) -#define weechat_exec_on_files(__directory, __data, __callback) \ - weechat_plugin->exec_on_files(__directory, __data, __callback) +#define weechat_exec_on_files(__directory, __hidden_files, __data, \ + __callback) \ + weechat_plugin->exec_on_files(__directory, __hidden_files, __data, \ + __callback) /* util */ #define weechat_timeval_cmp(__time1, __time2) \ |