diff options
| author | Alex Noir <Varsash@gmail.com> | 2022-07-30 21:05:21 +0300 |
|---|---|---|
| committer | Alex Noir <Varsash@gmail.com> | 2022-07-30 21:05:21 +0300 |
| commit | 1e49b38db726b233632d81cefb4a1b35eb1dcbfe (patch) | |
| tree | 805354ceabcd2816d768b0931263de5187b15db2 /src | |
| parent | 4fa86c0174961be22e1996a472e908b36656083d (diff) | |
Back up old effects ini
Diffstat (limited to 'src')
| -rw-r--r-- | src/text_file_functions.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index c7cf8d0c..f58ec4a9 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -912,7 +912,13 @@ QStringList AOApplication::get_effects(QString p_char) // port legacy effects if (!l_effects_ini.contains("version/major") || l_effects_ini.value("version/major").toInt() < 2) { - AOUtils::migrateEffects(l_effects_ini); + QFile effects_old(i_filepath); + if (QFile::copy(i_filepath, i_filepath + ".old")) { + AOUtils::migrateEffects(l_effects_ini); + } + else { + qWarning() << "Could not back up old effects.ini during migraiton"; + } } QStringList l_group_list; |
