Merge branch 'tizen_4.0' into tizen 11/173611/3 tizen_5.0 submit/tizen/20180329.080913 submit/tizen/20180402.130428 submit/tizen/20180831.124001 submit/tizen/20180831.162406 submit/tizen/20180921.133538 submit/tizen/20180921.171241 submit/tizen_5.0/20181101.000009
authorVikas Kumar Agrawal <vikas.ag@samsung.com>
Thu, 22 Mar 2018 13:19:43 +0000 (18:49 +0530)
committerVikas Kumar Agrawal <vikas.ag@samsung.com>
Fri, 23 Mar 2018 08:31:50 +0000 (14:01 +0530)
Conflicts:
src/common/file-operation/mf-request.c
src/common/file-system/mf-file-attr.c
src/common/mf-callback.c
src/common/mf-detail.c
src/common/mf-file-util.c
src/common/mf-fm-svc-wrapper.c
src/common/mf-launch.c
src/common/mf-media-content.c
src/common/mf-otg.c
src/common/mf-storage-space.c
src/common/mf-ug-detail-fs.c
src/common/mf-util.c
src/media-db/mf-media-db.c
src/media-db/mf-media.c
src/mf-main.c
src/thumbnail/mf-thumb-gen.c
src/widget/mf-category-view.c
src/widget/mf-detail-view.c
src/widget/mf-edit-view.c
src/widget/mf-gengrid.c
src/widget/mf-genlist.c
src/widget/mf-navi-bar.c
src/widget/mf-object-item.c
src/widget/mf-object.c
src/widget/mf-popup.c
src/widget/mf-root-view.c
src/widget/mf-search-bar.c
src/widget/mf-search-view.c
src/widget/mf-tray-item.c
src/widget/mf-view.c

Change-Id: I081420aa5631a02b00402b93f1fdb859805ec743

29 files changed:
1  2 
src/common/file-system/mf-file-attr.c
src/common/mf-callback.c
src/common/mf-detail.c
src/common/mf-file-util.c
src/common/mf-fm-svc-wrapper.c
src/common/mf-launch.c
src/common/mf-media-content.c
src/common/mf-otg.c
src/common/mf-storage-space.c
src/common/mf-ug-detail-fs.c
src/common/mf-util.c
src/media-db/mf-media-db.c
src/media-db/mf-media.c
src/mf-main.c
src/thumbnail/mf-thumb-gen.c
src/widget/mf-category-view.c
src/widget/mf-detail-view.c
src/widget/mf-edit-view.c
src/widget/mf-gengrid.c
src/widget/mf-genlist.c
src/widget/mf-navi-bar.c
src/widget/mf-object-item.c
src/widget/mf-object.c
src/widget/mf-popup.c
src/widget/mf-root-view.c
src/widget/mf-search-bar.c
src/widget/mf-search-view.c
src/widget/mf-tray-item.c
src/widget/mf-view.c

index c9b3a02,86cb366..23c4ecf
mode 100644,100644..100755
@@@ -207,16 -268,16 +268,18 @@@ int mf_file_cp(const char *src, const c
        FILE *f1 = NULL;
        FILE *f2 = NULL;
        char buf[BUF_MAX] = { 0, };     //TODO: How about moving buf to heap instead of stack
--      char realpath1[PATH_MAX_SIZE] = { 0, };
--      char realpath2[PATH_MAX_SIZE] = { 0, };
++      char *src_real_path = NULL;
++      char *dest_real_path = NULL;
        size_t num;
        int ret = 1;
  
--      if (!realpath(src, realpath1)) {
--              return 0;
--      }
--
--      if (realpath(dst, realpath2) && !strcmp(realpath1, realpath2)) {
++      src_real_path = realpath(src, NULL);
++      dest_real_path = realpath(dst, NULL);
++      if (!src_real_path || !dest_real_path || !strcmp(src_real_path, dest_real_path)) {
++              if (src_real_path)
++                      free(src_real_path);
++              if (dest_real_path)
++                      free(dest_real_path);
                return 0;
        }
  
  
        fclose(f1);
        fclose(f2);
--
++      free(src_real_path);
++      free(dest_real_path);
        return ret;
  }
  
index 9acb713,c799f9c..c799f9c
mode 100644,100644..100755
diff --cc src/mf-main.c
index 34944f8,3d5f1b2..3d5f1b2
mode 100644,100644..100755