mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +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,11 +1159,9 @@ 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);
|
||||||
@@ -1173,7 +1171,6 @@ static void readConfiguration(W_ColorPanel * panel)
|
|||||||
_("File Error"),
|
_("File Error"),
|
||||||
_("Could not create ColorPanel configuration directory"),
|
_("Could not create ColorPanel configuration directory"),
|
||||||
_("OK"), NULL, NULL);
|
_("OK"), NULL, NULL);
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user