Ticket #3514: skip-samefile-error.patch

File skip-samefile-error.patch, 2.8 KB (added by nkedel, 8 years ago)

Updated patch for 4.8.19, with change to gboolean

  • src/filemanager/boxes.c

    From e7253945f906344c08ca6cedce0667e112661589 Mon Sep 17 00:00:00 2001
    From: Nate Edel <nate.edel@gmail.com>
    Date: Wed, 12 Aug 2015 13:52:44 -0700
    Subject: [PATCH] Skip confirmation on same files, as I have a lot of symlinks
    
    ---
     src/filemanager/boxes.c | 2 ++
     src/filemanager/file.c  | 1 +
     src/setup.c             | 3 +++
     src/setup.h             | 1 +
     4 files changed, 7 insertions(+)
    
    diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
    index e153e5f..56f6dad 100644
    a b confirm_box (void) 
    930930                        &confirm_directory_hotlist_delete, NULL), 
    931931        QUICK_CHECKBOX (Q_("Confirmation|&History cleanup"), 
    932932                        &mc_global.widget.confirm_history_cleanup, NULL), 
     933        QUICK_CHECKBOX (Q_("Confirmation|Skip &same file"), 
     934                        &confirm_skip_same_file, NULL), 
    933935        QUICK_BUTTONS_OK_CANCEL, 
    934936        QUICK_END 
    935937        /* *INDENT-ON* */ 
  • src/filemanager/file.c

    diff --git a/src/filemanager/file.c b/src/filemanager/file.c
    index 0bacc54..58bc1f2 100644
    a b real_warn_same_file (enum OperationMode mode, const char *fmt, const char *a, co 
    645645static FileProgressStatus 
    646646warn_same_file (const char *fmt, const char *a, const char *b) 
    647647{ 
     648    if (!confirm_skip_same_file) return FILE_SKIP; 
    648649#ifdef ENABLE_BACKGROUND 
    649650/* *INDENT-OFF* */ 
    650651    union 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 5cd32ab..65c195d 100644
    a b gboolean confirm_overwrite = TRUE; 
    101101gboolean confirm_execute = FALSE; 
    102102/* Asks for confirmation before leaving the program */ 
    103103gboolean confirm_exit = FALSE; 
     104/* Shows skip/abort message when copying over the same file/inode */ 
     105gboolean confirm_skip_same_file = 0; 
    104106 
    105107/* If true, at startup the user-menu is invoked */ 
    106108gboolean auto_menu = FALSE; 
    static const struct 
    289291    { "confirm_history_cleanup", &mc_global.widget.confirm_history_cleanup }, 
    290292    { "confirm_exit", &confirm_exit }, 
    291293    { "confirm_directory_hotlist_delete", &confirm_directory_hotlist_delete }, 
     294    { "confirm_skip_same_file", &confirm_skip_same_file }, 
    292295    { "confirm_view_dir", &confirm_view_dir }, 
    293296    { "safe_delete", &safe_delete }, 
    294297#ifndef HAVE_CHARSET 
  • src/setup.h

         { "eight_bit_clean", &mc_global.eight_bit_clean },
         { "full_eight_bits", &mc_global.full_eight_bits },
    diff --git a/src/setup.h b/src/setup.h
    index 203ca30..d41ba5f 100644
    a b extern int confirm_execute; 
    8080extern gboolean confirm_exit; 
    8181extern gboolean confirm_overwrite; 
    8282extern gboolean confirm_view_dir; 
     83extern gboolean confirm_skip_same_file; 
    8384extern gboolean safe_delete; 
    8485extern gboolean clear_before_exec; 
    8586extern gboolean auto_menu;