mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
adding download helping function
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1546,6 +1546,17 @@ std::string genTmpName(std::string suffix,unsigned int length)
|
||||
return Str;
|
||||
}
|
||||
|
||||
std::string dlTmpName(std::string url)
|
||||
{
|
||||
if (strstr(url.c_str(), "://"))
|
||||
{
|
||||
std::string tmpname = genTmpName(url.substr(url.find_last_of(".")+1),10);
|
||||
if (downloadUrl(url,tmpname))
|
||||
url = tmpname;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
// curl
|
||||
static void *myrealloc(void *ptr, size_t size)
|
||||
{
|
||||
|
Reference in New Issue
Block a user