diff --git a/GlosSIConfig/Resource.rc b/GlosSIConfig/Resource.rc index 9fd0612..a0f0331 100644 --- a/GlosSIConfig/Resource.rc +++ b/GlosSIConfig/Resource.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,0,7,1 - PRODUCTVERSION 0,0,7,1 + FILEVERSION 0,0,7,102000153200 + PRODUCTVERSION 0,0,7,102000153200 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "Peter Repukat - FlatspotSoftware" VALUE "FileDescription", "GlosSI - Config" - VALUE "FileVersion", "0.0.7.1" + VALUE "FileVersion", "0.0.7.1-2-gd15320b" VALUE "InternalName", "GlosSIConfig" VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware" VALUE "OriginalFilename", "GlosSIConfig.exe" VALUE "ProductName", "GlosSI" - VALUE "ProductVersion", "0.0.7.1" + VALUE "ProductVersion", "0.0.7.1-2-gd15320b" END END BLOCK "VarFileInfo" @@ -108,3 +108,19 @@ IDI_ICON1 ICON "..\GloSC_Icon.ico" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + + + + + + + + + + + + + + + + diff --git a/GlosSIConfig/VDFParser.h b/GlosSIConfig/VDFParser.h index dca5287..3234170 100644 --- a/GlosSIConfig/VDFParser.h +++ b/GlosSIConfig/VDFParser.h @@ -24,6 +24,8 @@ limitations under the License. #include #include +#include + namespace VDFParser { namespace crc { template @@ -489,7 +491,14 @@ class Parser { static inline bool writeShortcuts(std::filesystem::path path, const VDFFile& vdffile) { - const auto copied = std::filesystem::copy_file(path, path.wstring() + L".bak", std::filesystem::copy_options::update_existing); + const auto backupFileName = path.wstring() + L".bak"; + if (std::filesystem::exists(path) && !std::filesystem::exists(backupFileName)) { + qDebug() << "No shortcuts backup detected... Creating now..."; + const auto copied = std::filesystem::copy_file(path, backupFileName, std::filesystem::copy_options::update_existing); + if (!copied) { + qDebug() << "failed to copy shortcuts.vdf to backup!"; + } + } ofile.open(path.wstring(), std::ios::binary | std::ios::out); if (!ofile.is_open()) {