1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

Use wmkdirhier instead of mkdir to create color config directory

Otherwise, if ~/GNUstep/Library doesn't already exist, then creating
~/GNUstep/Library/Colors will fail.
This commit is contained in:
Torrance, Douglas
2021-06-29 19:21:31 +00:00
committed by Carlos R. Mafra
parent 6afa419b01
commit a6ec6a30a3

View File

@@ -1159,21 +1159,18 @@ static void readConfiguration(W_ColorPanel * panel)
DIR *dPtr; DIR *dPtr;
struct dirent *dp; struct dirent *dp;
struct stat stat_buf;
int item; int item;
if (stat(panel->configurationPath, &stat_buf) != 0) { if (!wmkdirhier(panel->configurationPath)) {
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) { werror(_("Color Panel: Could not create directory %s needed"
werror(_("Color Panel: Could not create directory %s needed" " to store configurations"), panel->configurationPath);
" to store configurations"), panel->configurationPath); WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False); WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False); WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False); WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win, _("File Error"),
_("File Error"), _("Could not create ColorPanel configuration directory"),
_("Could not create ColorPanel configuration directory"), _("OK"), NULL, NULL);
_("OK"), NULL, NULL);
}
return; return;
} }