mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
adding download helping function
Origin commit data
------------------
Commit: f474e60303
Author: TangoCash <eric@loxat.de>
Date: 2018-09-09 (Sun, 09 Sep 2018)
This commit is contained in:
@@ -1733,6 +1733,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