Change-Id: Ie8fc9c7a7a4023d48c57b871d2a0366526388772
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
using namespace std;
+static bool check_rw_mount();
+
static bool app_create(void *data)
{
/* Hook to take necessary actions before main event loop starts
If this function returns true, the main loop of application starts
If this function returns false, the application is terminated */
+ if (!check_rw_mount()) {
+ service_app_exit();
+ return true;
+ }
+
LOGD("");
char log_path[PATH_MAX];
char *data_path = NULL;
data_path = app_get_shared_data_path();
+ if (!data_path)
+ return;
+
snprintf(log_path, sizeof(log_path), "%s/log", data_path);
- if (data_path)
+ if (access(data_path, R_OK) != 0) {
free(data_path);
+ return;
+ }
+
+ free(data_path);
int idx = 0;
if (preference_get_int(LAST_LOG_FILE_INDEX, &idx) != PREFERENCE_ERROR_NONE) {