2 Various non-library utilities
4 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011
5 The Free Software Foundation, Inc.
10 This file is part of the Midnight Commander.
12 The Midnight Commander is free software: you can redistribute it
13 and/or modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation, either version 3 of the License,
15 or (at your option) any later version.
17 The Midnight Commander is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #include "lib/global.h"
31 #include "src/filemanager/file.h"
32 #include "src/filemanager/filegui.h"
36 /*** global variables ****************************************************************************/
38 /*** file scope macro definitions ****************************************************************/
40 /*** file scope type declarations ****************************************************************/
42 /*** file scope variables ************************************************************************/
44 /*** file scope functions ************************************************************************/
45 /* --------------------------------------------------------------------------------------------- */
47 /* --------------------------------------------------------------------------------------------- */
48 /*** public functions ****************************************************************************/
49 /* --------------------------------------------------------------------------------------------- */
52 check_for_default (const char *default_file
, const char *file
)
54 if (!exist_file (file
))
57 FileOpTotalContext
*tctx
;
59 if (!exist_file (default_file
))
62 ctx
= file_op_context_new (OP_COPY
);
63 tctx
= file_op_total_context_new ();
64 file_op_context_create_ui (ctx
, 0, FALSE
);
65 copy_file_file (tctx
, ctx
, default_file
, file
);
66 file_op_total_context_destroy (tctx
);
67 file_op_context_destroy (ctx
);
73 /* --------------------------------------------------------------------------------------------- */