bug fix: add error handling for preventing duplicate file
[platform/framework/web/download-provider.git] / agent / download-agent-file.c
index cc400e2..c60e6a9 100755 (executable)
@@ -552,6 +552,9 @@ da_ret_t start_file_writing(da_info_t *da_info)
                free(origin_path);
                if (file_info)
                        ret = __decide_file_path_for_resume(file_info);
+       } else if (file_info->file_path) {
+               DA_LOGE("Already exist");
+               return ret;
        } else {
                ret = __decide_file_path(da_info);
        }