Change-Id: Idbaa8b26f5c3440d3753ae1612fd1745c1e589ec
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
if (readonly)
path = tzplatform_mkpath(TZ_SYS_RO_ICONS, "/");
- else
- path = tzplatform_mkpath(TZ_SYS_RW_ICONS, "/");
/* just allow certain users to create the icon directory if needed. */
- if (uid_caller == ROOT_UID || uid_caller == APPFW_UID || uid_caller == uid)
+ if (path && (uid_caller == ROOT_UID ||
+ uid_caller == APPFW_UID || uid_caller == uid))
_mkdir_for_user(path, uid, gid);
return path;