From: Seunghun Lee Date: Wed, 19 Feb 2020 08:37:06 +0000 (+0900) Subject: e_info_client_screen_recorder: change default file path to '/tmp'. X-Git-Tag: submit/tizen/20200220.070651~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F225369%2F1;p=platform%2Fupstream%2Fenlightenment.git e_info_client_screen_recorder: change default file path to '/tmp'. Change-Id: Ifc9c870e73de53fe939194cd23268a72081fc4da --- diff --git a/src/bin/e_info_client_screen_recorder.c b/src/bin/e_info_client_screen_recorder.c index a96710c8d1..6bfdab2e62 100644 --- a/src/bin/e_info_client_screen_recorder.c +++ b/src/bin/e_info_client_screen_recorder.c @@ -150,22 +150,18 @@ _screen_recorder_efl_shutdown(void) static Eina_Bool _screen_recorder_fullpath_make_with_ext(char out[PATH_MAX], const char *filename) { - char cwd[PATH_MAX], fullname[PATH_MAX] = {0,}; + char fullname[PATH_MAX] = {0,}; char *dot; const char *ext = ".mp4"; const char *prefix = "e-screen-record"; + const char *default_path = "/tmp"; int len_l, len; len_l = PATH_MAX; if (filename) { if (filename[0] != '/') - { - if (!getcwd(cwd, sizeof(cwd))) - snprintf(cwd, sizeof(cwd), "/tmp"); - - len = snprintf(fullname, len_l, "%s/%s", cwd, filename); - } + len = snprintf(fullname, len_l, "%s/%s", default_path, filename); else len = snprintf(fullname, len_l, "%s", filename); @@ -204,11 +200,8 @@ _screen_recorder_fullpath_make_with_ext(char out[PATH_MAX], const char *filename if (!t) return EINA_FALSE; - if (!getcwd(cwd, sizeof(cwd))) - snprintf(cwd, sizeof(cwd), "/tmp"); - len = snprintf(fullname, len_l, "%s/%s-%04d%02d%02d.%02d%02d%02d", - cwd, prefix, + default_path, prefix, t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); len_l -= len;