Skipping file from log window if the destination is a backup.

This commit is contained in:
sergiotarxz 2024-03-07 12:04:12 +01:00
parent 99bfe816a1
commit 0e5fc66f5b
1 changed files with 6 additions and 0 deletions

View File

@ -204,8 +204,14 @@ sub create_button_restore {
if ( defined $dest_file ) {
$dest_file = path($dest_file);
}
my $data_dir = GEmeTool::Config->new->data_dir;
my $backup_dir = $data_dir->child('backups');
$file = path($file);
return if !-e $file;
if ( index($dest_file, $backup_dir,) >= 0 ) {
# Skipping backups from possible restore destinations.
return;
}
my $button_restore_backup = Gtk4::Button->new_with_label($restore_label);
$button_restore_backup->set_margin_start(30);
$button_restore_backup->signal_connect(