1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 04:44:16 +01:00

Feet protector for getstyle

Since getstyle now saves the theme pack in $GUR instead of
the cwd, there's a slight possibility you can specify a theme
pack name that will do Bad Things to your existing stuff.

To that end, specified theme pack name is "sanitised" a bit, as in
forward slashes in it are replaced by an underscore.

Oh yes, i forgot to mention. getstyle now saves the theme pack
in $GNUSTEP_USER_ROOT, not in cwd.
This commit is contained in:
Tamas TEVESZ
2010-03-18 00:51:33 +01:00
committed by Carlos R. Mafra
parent 9f7aaa8aed
commit 5f02b1b5f4

View File

@@ -352,7 +352,7 @@ void makeThemePack(WMPropList * style, char *themeName)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
WMPropList *prop, *style, *key, *val; WMPropList *prop, *style, *key, *val;
char *path; char *path, *p;
int i, theme_too = 0, make_pack = 0; int i, theme_too = 0, make_pack = 0;
char *style_file = NULL; char *style_file = NULL;
@@ -379,6 +379,8 @@ int main(int argc, char **argv)
exit(1); exit(1);
} }
style_file = argv[i]; style_file = argv[i];
while ((p = strchr(style_file, '/')) != NULL)
*p = '_';
} }
} }
} }