1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-12 10:44:58 +03:00

separte log directory and database(config) directory

@ was an alias for exedir. To separate log directory and
database(config) directory, @ is now an alias for logdir and $ is an
alias for dbdir.
This commit is contained in:
Koichiro IWAO
2019-09-11 13:34:09 +09:00
parent 01abdedc45
commit c64674479d
10 changed files with 37 additions and 25 deletions

View File

@ -33,12 +33,12 @@ void BackupCfgWEx(CFG_RW *rw, FOLDER *f, wchar_t *original, UINT revision_number
}
// Determine the directory name
UniFormat(dirname, sizeof(dirname), L"@backup.%s", original[0] == L'@' ? original + 1 : original);
UniFormat(dirname, sizeof(dirname), L"$backup.%s", original[0] == L'$' ? original + 1 : original);
// Determine the file name
LocalTime(&st);
UniFormat(datestr, sizeof(datestr), L"%04u%02u%02u%02u_%s",
st.wYear, st.wMonth, st.wDay, st.wHour, original[0] == L'@' ? original + 1 : original);
st.wYear, st.wMonth, st.wDay, st.wHour, original[0] == L'$' ? original + 1 : original);
if (revision_number == INFINITE)
{
@ -47,7 +47,7 @@ void BackupCfgWEx(CFG_RW *rw, FOLDER *f, wchar_t *original, UINT revision_number
else
{
UniFormat(filename, sizeof(filename), L"%08u_%s",
revision_number, original[0] == L'@' ? original + 1 : original);
revision_number, original[0] == L'$' ? original + 1 : original);
}
// Don't save if the date and time has not been changed