Change the naming rule for duplicate files 52/273052/1 accepted/tizen/6.5/unified/20220608.140007 submit/tizen_6.5/20220607.061737
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 30 Mar 2022 06:03:35 +0000 (15:03 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 30 Mar 2022 06:03:35 +0000 (15:03 +0900)
Change-Id: I4acd70d8102d166db2de2b5bd7ec9277bd87b074

agent/download-agent-file.c
packaging/download-provider.spec

index c60e6a9a54721d90b8fbf5c966ed0dc806e0bf3a..90782ff2512b814c0e684a98cc000632c4d522cd 100755 (executable)
@@ -802,7 +802,7 @@ char *get_full_path_avoided_duplication(const char *in_dir,
        int extension_len = 0;
 
        int suffix_count = 0;   /* means suffix on file name. up to "_99" */
-       int suffix_len = (int)log10(MAX_SUFFIX_COUNT + 1) + 1;  /* 1 means "_" */
+       int suffix_len = (int)log10(MAX_SUFFIX_COUNT + 1) + 2;  /* 2 means "()" */
 
        if (!in_dir || !in_candidate_file_name)
                return DA_NULL;
@@ -844,7 +844,7 @@ char *get_full_path_avoided_duplication(const char *in_dir,
                                                "%s/%s", dir, file_name);
                        } else {
                                snprintf(final_path, final_path_len,
-                                               "%s/%s_%d", dir, file_name, suffix_count);
+                                               "%s/%s(%d)", dir, file_name, suffix_count);
                        }
                } else {
                        if (suffix_count == 0) {
@@ -852,7 +852,7 @@ char *get_full_path_avoided_duplication(const char *in_dir,
                                                "%s/%s.%s", dir, file_name, extension);
                        } else {
                                snprintf(final_path, final_path_len,
-                                               "%s/%s_%d.%s",
+                                               "%s/%s(%d).%s",
                                                dir, file_name, suffix_count, extension);
                        }
                }
index a94d99043012e24717f3eab251a00627c0d9b036..c493162be620a758ab77606585aef8ff4e99b1a3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.2.10
+Version:    2.2.11
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0