fix TSAM6653 issue because smack 55/83955/1
authorintae, jeon <intae.jeon@samsung.com>
Tue, 16 Aug 2016 04:51:13 +0000 (13:51 +0900)
committerintae, jeon <intae.jeon@samsung.com>
Tue, 16 Aug 2016 04:51:13 +0000 (13:51 +0900)
Change-Id: Ida32a46fc45282077df8e766f775fc75d2565f4d
Signed-off-by: intae, jeon <intae.jeon@samsung.com>
email-core/email-storage/email-storage.c

index b44dfeb..5e3ca31 100755 (executable)
@@ -12133,19 +12133,10 @@ INTERNAL_FUNC int emstorage_move_file(char *src_file, char *dst_file, int sync_s
        EM_DEBUG_LOG_SEC("src_file[%s], dst_file[%s]", src_file, dst_file);
 
        if (strcmp(src_file, dst_file) != 0) {
-               if (rename(src_file, dst_file) != 0) {
-                       /* EM_DEBUG_EXCEPTION("%s", strerror(errno)); */
-                       if (errno == EXDEV) {   /* oldpath and newpath are not on the same mounted file system.  (Linux permits a file system to be mounted at multiple points,  but  rename() */
-                               /*  does not work across different mount points, even if the same file system is mounted on both.)       */
                                EM_DEBUG_LOG("oldpath and newpath are not on the same mounted file system.");
                                if (!emstorage_copy_file(src_file, dst_file, sync_status, &error)) {
                                        EM_DEBUG_EXCEPTION("emstorage_copy_file failed - %d", error);
-                                       goto FINISH_OFF;
-                               }
-                               remove(src_file);
-                               EM_DEBUG_LOG("src[%s] removed", src_file);
-                       } else {
-                               if (errno == ENOENT) {
+
                                        struct stat temp_file_stat;
                                        if (stat(src_file, &temp_file_stat) < 0) {
                                                EM_DEBUG_EXCEPTION("no src file found [%s] : %s", src_file, EM_STRERROR(errno_buf));
@@ -12155,13 +12146,11 @@ INTERNAL_FUNC int emstorage_move_file(char *src_file, char *dst_file, int sync_s
 
                                        error = EMAIL_ERROR_FILE_NOT_FOUND;
                                        goto FINISH_OFF;
-                               } else {
-                                       EM_DEBUG_EXCEPTION("rename failed: %s", EM_STRERROR(errno_buf));
-                                       error = EMAIL_ERROR_SYSTEM_FAILURE;
-                                       goto FINISH_OFF;
+
+
                                }
-                       }
-               }
+                               remove(src_file);
+                               EM_DEBUG_LOG("src[%s] removed", src_file);
        } else {
                EM_DEBUG_LOG("src[%s] = dst[%s]", src_file, dst_file);
        }