preset: fix update rule

Only update the preset from system, if we had a preset before and system
version is newer.
This commit is contained in:
Stefan Kost 2009-05-24 23:14:26 +03:00
parent 5c4751c601
commit 9574d82bf9

View file

@ -344,10 +344,12 @@ preset_get_keyfile (GstPreset * preset)
/* compare version to check for merge */ /* compare version to check for merge */
if (in_system) { if (in_system) {
if (!in_user || preset_parse_version (str_version_system) > /* keep system presets if there is no user preset or when the system
* version is higher than the user version. */
if (!in_user) {
presets = in_system;
} else if (preset_parse_version (str_version_system) >
preset_parse_version (str_version_user)) { preset_parse_version (str_version_user)) {
/* keep system presets if there is no user preset or when the system
* version is higher than the user version. */
presets = in_system; presets = in_system;
updated_from_system = TRUE; updated_from_system = TRUE;
} }