forked from enlightenment/efl
patch from bluezery to use proper eina log dom and remove 0 byte destination files on failed download
SVN revision: 64962
This commit is contained in:
parent
1f5a1508b7
commit
d295264bc0
|
@ -105,14 +105,14 @@ _ecore_file_download(const char *url,
|
||||||
|
|
||||||
if (!ecore_file_is_dir(dir))
|
if (!ecore_file_is_dir(dir))
|
||||||
{
|
{
|
||||||
EINA_LOG_ERR("%s is not a directory", dir);
|
ERR("%s is not a directory", dir);
|
||||||
free(dir);
|
free(dir);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
free(dir);
|
free(dir);
|
||||||
if (ecore_file_exists(dst))
|
if (ecore_file_exists(dst))
|
||||||
{
|
{
|
||||||
EINA_LOG_ERR("%s already exists", dst);
|
WRN("%s already exists", dst);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ _ecore_file_download(const char *url,
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EINA_LOG_ERR("no job returned\n");
|
ERR("no job returned\n");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
return job ? EINA_TRUE : EINA_FALSE;
|
return job ? EINA_TRUE : EINA_FALSE;
|
||||||
|
@ -374,6 +374,7 @@ _ecore_file_download_curl(const char *url, const char *dst,
|
||||||
ecore_con_url_free(job->url_con);
|
ecore_con_url_free(job->url_con);
|
||||||
_job_list = eina_list_remove(_job_list, job);
|
_job_list = eina_list_remove(_job_list, job);
|
||||||
fclose(job->file);
|
fclose(job->file);
|
||||||
|
ecore_file_remove(job->dst);
|
||||||
free(job->dst);
|
free(job->dst);
|
||||||
free(job);
|
free(job);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue