From 5ff340fcb2be573660873c165e8bc6b2580b12f3 Mon Sep 17 00:00:00 2001 From: "munkyu.im" Date: Fri, 24 Feb 2012 14:50:14 +0900 Subject: [PATCH] [Title]change tizen_vms to .tizen_vms [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- tizen/src/debug_ch_vtm.c | 10 +++++++++- tizen/src/fileio.c | 8 ++++---- tizen/src/vtm.c | 7 +------ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tizen/src/debug_ch_vtm.c b/tizen/src/debug_ch_vtm.c index 9bd9c10..ce4415b 100644 --- a/tizen/src/debug_ch_vtm.c +++ b/tizen/src/debug_ch_vtm.c @@ -252,6 +252,7 @@ static void debug_init(void) char *debug = NULL; FILE *fp = NULL; char *tmp = NULL; + char *tizen_vms_path = NULL; if (nb_debug_options != -1) return; /* already initialized */ @@ -289,8 +290,15 @@ static void debug_init(void) free(tmp); } - strcpy(logfile, get_tizen_vms_path()); + //to make logfile, create tizen_vms dir + tizen_vms_path = (char*)get_tizen_vms_path(); + if(access(tizen_vms_path, R_OK) != 0){ + g_mkdir_with_parents(tizen_vms_path, 0755); + } + strcpy(logfile, tizen_vms_path); strcat(logfile, EMULMGR_LOGFILE); + + free(tizen_vms_path); if(access(logfile, F_OK | R_OK) == 0) remove(logfile); diff --git a/tizen/src/fileio.c b/tizen/src/fileio.c index f971ea6..2470b2a 100644 --- a/tizen/src/fileio.c +++ b/tizen/src/fileio.c @@ -471,7 +471,7 @@ const gchar *get_conf_path(void) return conf_path; } -/* get_tizen_vms_arch_path = "/home/{USER}/tizen_vms/{ARCH}" */ +/* get_tizen_vms_arch_path = "/home/{USER}/.tizen_vms/{ARCH}" */ const gchar *get_tizen_vms_arch_path(void) { char *tizen_vms_arch_path; @@ -502,10 +502,10 @@ const gchar *get_tizen_vms_arch_path(void) return tizen_vms_arch_path; } -/* get_tizen_vms_path = "/home/{USER}/tizen_vms" */ +/* get_tizen_vms_path = "/home/{USER}/.tizen_vms" */ const gchar *get_tizen_vms_path(void) { - static const char tizen_vms[] = "/tizen_vms"; + static const char tizen_vms[] = "/.tizen_vms"; #ifndef _WIN32 char *homedir = (char*)g_getenv("HOME"); #else @@ -524,7 +524,7 @@ const gchar *get_tizen_vms_path(void) return tizen_vms_path; } -/* get_screenshot_path = "/home/{USER}/tizen_vms/screenshots" */ +/* get_screenshot_path = "/home/{USER}/.tizen_vms/screenshots" */ const gchar *get_screenshots_path(void) { const char subdir[] = "/screenshots"; diff --git a/tizen/src/vtm.c b/tizen/src/vtm.c index 289f32f..549d51e 100644 --- a/tizen/src/vtm.c +++ b/tizen/src/vtm.c @@ -2972,12 +2972,7 @@ int main(int argc, char** argv) int status; char *skin = NULL; char full_glade_path[MAX_LEN]; - char *tizen_vms_path = (char*)get_tizen_vms_path(); - if(access(tizen_vms_path, R_OK) != 0){ - g_mkdir_with_parents(tizen_vms_path, 0755); - } - free(tizen_vms_path); - + working_dir = g_path_get_dirname(buf); status = g_chdir(working_dir); if(status == -1) -- 2.7.4