mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
helpers: add function to get backup suffix
Origin commit data
------------------
Commit: 427a949807
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-11-12 (Thu, 12 Nov 2020)
Origin message was:
------------------
- helpers: add function to get backup suffix
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
//#include <driver/framebuffer.h>
|
||||
#include <system/helpers.h>
|
||||
#include <system/helpers-json.h>
|
||||
#include <lib/libnet/libnet.h>
|
||||
#include <gui/update_ext.h>
|
||||
#include <libmd5sum.h>
|
||||
#define MD5_DIGEST_LENGTH 16
|
||||
@@ -623,6 +624,13 @@ std::string getFileExt(std::string &file)
|
||||
return _getBaseName(f, ".");
|
||||
}
|
||||
|
||||
std::string getBackupSuffix()
|
||||
{
|
||||
std::string hostName = "";
|
||||
netGetHostname(hostName);
|
||||
|
||||
return hostName + getNowTimeStr("_%Y%m%d_%H%M");
|
||||
}
|
||||
|
||||
std::string getNowTimeStr(const char* format)
|
||||
{
|
||||
|
Reference in New Issue
Block a user