From 6db2cb60ea099ba26f53ea017062e76e26f5994b Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 19 Feb 2020 17:37:06 +0900 Subject: [PATCH] e_info_client_screen_recorder: change default file path to '/tmp'. Change-Id: Ifc9c870e73de53fe939194cd23268a72081fc4da --- src/bin/e_info_client_screen_recorder.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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; -- 2.34.1