From 44cb08d0c5d59a6f203ea2dbe7a5bf629d00e182 Mon Sep 17 00:00:00 2001 From: Yong Yeon Kim Date: Wed, 17 Apr 2013 11:09:41 +0900 Subject: [PATCH] fix prevent bugs --- src/common/media-common-external-storage.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/common/media-common-external-storage.c b/src/common/media-common-external-storage.c index 4b0ebed..31358da 100755 --- a/src/common/media-common-external-storage.c +++ b/src/common/media-common-external-storage.c @@ -57,12 +57,18 @@ ms_make_default_path_mmc(void) if (dp == NULL) { ret = mkdir(default_path[i], 0777); if (ret < 0) { - MS_DBG("make fail"); + MS_DBG_ERR("make fail"); } /*this fuction for emulator*/ /*at the first time, the directroies are made permission 755*/ - chmod(default_path[i], 0777); - chown(default_path[i], 5000, 5000); + ret = chmod(default_path[i], 0777); + if (ret != 0) { + MS_DBG_ERR("chmod failed [%s]", strerror(errno)); + } + ret = chown(default_path[i], 5000, 5000); + if (ret != 0) { + MS_DBG_ERR("chown failed [%s]", strerror(errno)); + } } else { closedir(dp); } -- 2.7.4