diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-18 16:04:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-18 16:04:43 +0300 |
commit | 3bf5f14f6f970e4be61a3b4f2c073a113937efc5 (patch) | |
tree | b783d9ac57d8da3d7e0680ac0ec470b4f722272f | |
parent | 600a356fd4f4e91d6c81cfbd76fc30a720686cc4 (diff) |
Db_autobackups: variables support
-rw-r--r-- | plugins/Db_autobackups/src/backup.cpp | 6 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/stdafx.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index 3ff1be80ba..2c5c9568cb 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -215,7 +215,11 @@ static int Backup(wchar_t *backup_filename) bZip = g_plugin.use_zip != 0;
RotateBackups(backupfolder, dbname);
- CMStringW wszFileName(VARSW(g_plugin.file_mask));
+ CMStringW wszFileName;
+ if (ServiceExists(MS_VARS_FORMATSTRING))
+ wszFileName = VARSW(ptrW(variables_parse(g_plugin.file_mask, nullptr, 0)));
+ else
+ wszFileName = VARSW(g_plugin.file_mask);
wchar_t buffer[MAX_PATH];
DWORD size = _countof(buffer);
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h index 4a43f66e66..94584b3e26 100644 --- a/plugins/Db_autobackups/src/stdafx.h +++ b/plugins/Db_autobackups/src/stdafx.h @@ -22,6 +22,7 @@ namespace fs = std::experimental::filesystem; #include <m_icolib.h>
#include <m_autobackups.h>
#include <m_gui.h>
+#include <m_variables.h>
#include <m_folders.h>
#include <m_cloudfile.h>
|