mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +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:
committed by
Carlos R. Mafra
parent
6afa419b01
commit
a6ec6a30a3
@@ -1159,21 +1159,18 @@ static void readConfiguration(W_ColorPanel * panel)
|
||||
|
||||
DIR *dPtr;
|
||||
struct dirent *dp;
|
||||
struct stat stat_buf;
|
||||
int item;
|
||||
|
||||
if (stat(panel->configurationPath, &stat_buf) != 0) {
|
||||
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) {
|
||||
werror(_("Color Panel: Could not create directory %s needed"
|
||||
" to store configurations"), panel->configurationPath);
|
||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
_("File Error"),
|
||||
_("Could not create ColorPanel configuration directory"),
|
||||
_("OK"), NULL, NULL);
|
||||
}
|
||||
if (!wmkdirhier(panel->configurationPath)) {
|
||||
werror(_("Color Panel: Could not create directory %s needed"
|
||||
" to store configurations"), panel->configurationPath);
|
||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||
_("File Error"),
|
||||
_("Could not create ColorPanel configuration directory"),
|
||||
_("OK"), NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user