TizenRefApp-5362 [Email] Remove excess creating/deleting folder in Composer for share... 16/55416/1
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 23 Dec 2015 13:00:25 +0000 (15:00 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 23 Dec 2015 13:03:46 +0000 (15:03 +0200)
Change-Id: I37688ed8289ae12eddf92a72055fa638508a63cc

Project-Files/modules/composer/src/email-composer-util.c
Project-Files/modules/composer/src/email-composer.c

index 9d66f2b..59a059b 100644 (file)
@@ -58,7 +58,6 @@ EMAIL_DEFINE_GET_EDJ_PATH(email_get_composer_theme_path, "/email-composer-view.e
 
 #ifdef _SAVE_IN_USER_SHARE_DIR_
 EMAIL_DEFINE_GET_USER_SHARE_PATH(email_get_composer_tmp_dir, "/.email-composer-efl")
-EMAIL_DEFINE_GET_USER_SHARE_PATH(email_get_composer_public_tmp_dir, "/.email-composer-efl")
 #else
 EMAIL_DEFINE_GET_SHARED_DATA_PATH(email_get_composer_tmp_dir, "/.email-composer-efl")
 EMAIL_DEFINE_GET_PHONE_PATH(email_get_composer_public_tmp_dir, "/.email-composer-efl")
index 1678b8c..65258cb 100644 (file)
@@ -630,9 +630,11 @@ static COMPOSER_ERROR_TYPE_E _composer_create_temp_folders()
                        composer_util_file_get_temp_dirname());
        retvm_if(ret != COMPOSER_ERROR_NONE, ret, "_composer_create_temp_folder() failed! ret:[%d]", ret);
 
+#ifndef _SAVE_IN_USER_SHARE_DIR_
        ret = _composer_create_temp_folder(email_get_composer_public_tmp_dir(),
                        composer_util_file_get_public_temp_dirname());
        retvm_if(ret != COMPOSER_ERROR_NONE, ret, "_composer_create_temp_folder() failed! ret:[%d]", ret);
+#endif
 
        debug_leave();
        return COMPOSER_ERROR_NONE;
@@ -741,11 +743,11 @@ static void _composer_remove_temp_folders()
        if (!email_file_recursive_rm(composer_util_file_get_temp_dirname())) {
                debug_warning("email_file_recursive_rm() failed!");
        }
-
+#ifndef _SAVE_IN_USER_SHARE_DIR_
        if (!email_file_recursive_rm(composer_util_file_get_public_temp_dirname())) {
                debug_warning("email_file_recursive_rm() failed!");
        }
-
+#endif
        debug_leave();
 }