X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhelper-api.c;h=54093e409204de6d3c082d335b67ee86c7d4aff3;hb=d11b338cea727ef1463c06b94b89653d1a168727;hp=4c07c77933164a7728e96b9b621e64b3bbbaee2b;hpb=d5836c2c45c63cb627d1a72591e1f47f8e229aad;p=src%2Fapp-framework-binder.git diff --git a/src/helper-api.c b/src/helper-api.c index 4c07c779..54093e40 100644 --- a/src/helper-api.c +++ b/src/helper-api.c @@ -177,7 +177,7 @@ PUBLIC json_object* getPostFile (AFB_request *request, AFB_PostItem *item, char* // make sure destination directory exist destDir = opendir (filepath); if (destDir == NULL) { - if ( 0 <= mkdir(filepath,O_RDWR | S_IRWXU | S_IRGRP)) { + if (mkdir(filepath,O_RDWR | S_IRWXU | S_IRGRP) < 0) { postFileCtx->jresp= jsonNewMessage(AFB_FAIL,"Fail to Create destination directory=[%s] error=%s\n", filepath, strerror(errno)); goto ExitOnError; }