From: Seonah Moon Date: Wed, 30 Mar 2022 06:03:35 +0000 (+0900) Subject: Change the naming rule for duplicate files X-Git-Tag: accepted/tizen/7.0/unified/hotfix/20221116.110308^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F273055%2F1;p=platform%2Fframework%2Fweb%2Fdownload-provider.git Change the naming rule for duplicate files Change-Id: I25a3010f7e3b8f76deccbfa44ac08966b9fc8441 --- diff --git a/agent/download-agent-file.c b/agent/download-agent-file.c index c60e6a9..90782ff 100755 --- a/agent/download-agent-file.c +++ b/agent/download-agent-file.c @@ -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); } } diff --git a/packaging/download-provider.spec b/packaging/download-provider.spec index e000cd0..8503c2c 100755 --- a/packaging/download-provider.spec +++ b/packaging/download-provider.spec @@ -1,6 +1,6 @@ Name: download-provider Summary: Download the contents in background -Version: 2.3.3 +Version: 2.3.4 Release: 0 Group: Development/Libraries License: Apache-2.0