append .sav suffix to backups if not already present
This commit is contained in:
parent
aba5d0fd3c
commit
ecd600e76f
|
@ -1882,6 +1882,11 @@ static void ExportBackupMemoryDialog(GSimpleAction *action, GVariant *parameter,
|
||||||
GFile *file = gtk_file_chooser_get_file(GTK_FILE_CHOOSER(pFileSelection));
|
GFile *file = gtk_file_chooser_get_file(GTK_FILE_CHOOSER(pFileSelection));
|
||||||
gchar *sPath = g_file_get_path(file);
|
gchar *sPath = g_file_get_path(file);
|
||||||
|
|
||||||
|
if(! g_str_has_suffix(sPath, ".sav"))
|
||||||
|
{
|
||||||
|
sPath = g_strjoin(NULL, sPath, ".sav", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if(MMU_new.backupDevice.exportData(sPath) == false ) {
|
if(MMU_new.backupDevice.exportData(sPath) == false ) {
|
||||||
GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pWindow),
|
GtkWidget *pDialog = gtk_message_dialog_new(GTK_WINDOW(pWindow),
|
||||||
GTK_DIALOG_MODAL,
|
GTK_DIALOG_MODAL,
|
||||||
|
|
Loading…
Reference in New Issue