skip comments and empty lines
Dana Jansens danakj@orodu.net
1 files changed,
7 insertions(+),
3 deletions(-)
jump to
M
openbox/plugin.c
→
openbox/plugin.c
@@ -148,9 +148,13 @@ } else {
/* load the plugins in the rc file */ while (g_io_channel_read_line(io, &name, NULL, NULL, &err) == G_IO_STATUS_NORMAL) { - g_strstrip(name); - plugin_open(name); - g_free(name); + int i = 0; + while (name[++i-1] == ' ' || name[i-1] == '\t'); + if (name[i] != '\0' && name[i] != '#') { + g_strstrip(name); + plugin_open(name); + g_free(name); + } } g_io_channel_unref(io); }