CFileHelpers::createDir: Fix return value

Signed-off-by: M. Liebmann <tuxcode.bbg@gmail.com>
This commit is contained in:
[CST] Bas
2015-10-18 20:43:54 +02:00
committed by M. Liebmann
parent 75ae46a216
commit 0180d59111
3 changed files with 25 additions and 18 deletions

View File

@@ -161,10 +161,10 @@ int CThemes::Show()
CKeyboardInput nameInput(LOCALE_COLORTHEMEMENU_NAME, &file_name);
CMenuForwarder *m1 = new CMenuForwarder(LOCALE_COLORTHEMEMENU_SAVE, true , NULL, &nameInput, NULL, CRCInput::RC_green);
if (CFileHelpers::createDir(THEMESDIR_VAR) && errno != EEXIST) {
if (!CFileHelpers::createDir(THEMESDIR_VAR)) {
printf("[neutrino theme] error creating %s\n", THEMESDIR_VAR);
}
if (access(THEMESDIR_VAR, F_OK) == 0 ) {
themes.addItem(GenericMenuSeparatorLine);
themes.addItem(m1);
@@ -365,7 +365,7 @@ void CThemes::move_userDir()
{
if (access(USERDIR, F_OK) == 0)
{
if (CFileHelpers::createDir(THEMESDIR_VAR) && errno != EEXIST)
if (!CFileHelpers::createDir(THEMESDIR_VAR))
{
printf("[neutrino theme] error creating %s\n", THEMESDIR_VAR);
return;