diff options
Diffstat (limited to 'mate-volume-control/sound-theme-file-utils.c')
-rw-r--r-- | mate-volume-control/sound-theme-file-utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mate-volume-control/sound-theme-file-utils.c b/mate-volume-control/sound-theme-file-utils.c index 0897954..df06be7 100644 --- a/mate-volume-control/sound-theme-file-utils.c +++ b/mate-volume-control/sound-theme-file-utils.c @@ -1,5 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * Copyright (C) 2008 Bastien Nocera <[email protected]> + * Copyright (C) 2014-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -186,12 +187,12 @@ custom_theme_dir_is_empty (void) } static void -delete_one_file (const char *sound_name, const char *pattern) +delete_one_file (const char *sound_name, const char *file_extension) { GFile *file; char *name, *filename; - name = g_strdup_printf (pattern, sound_name); + name = g_strconcat (sound_name, file_extension, NULL); filename = custom_theme_dir_path (name); g_free (name); file = g_file_new_for_path (filename); @@ -206,7 +207,7 @@ delete_old_files (const char **sounds) guint i; for (i = 0; sounds[i] != NULL; i++) { - delete_one_file (sounds[i], "%s.ogg"); + delete_one_file (sounds[i], ".ogg"); } } @@ -216,7 +217,7 @@ delete_disabled_files (const char **sounds) guint i; for (i = 0; sounds[i] != NULL; i++) - delete_one_file (sounds[i], "%s.disabled"); + delete_one_file (sounds[i], ".disabled"); } static void |