summaryrefslogtreecommitdiffstats
path: root/src/filemanager/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filemanager/file.c')
-rw-r--r--src/filemanager/file.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/filemanager/file.c b/src/filemanager/file.c
index fa2ef44..4e1f2c9 100644
--- a/src/filemanager/file.c
+++ b/src/filemanager/file.c
@@ -1,7 +1,7 @@
/*
File management.
- Copyright (C) 1994-2023
+ Copyright (C) 1994-2024
Free Software Foundation, Inc.
Written by:
@@ -1521,7 +1521,7 @@ recursive_erase (file_op_total_context_t * tctx, file_op_context_t * ctx, const
*
* ATTENTION! Be careful when modifying this function (like commit 25e419ba0886f)!
* Some implementations of readdir() in MC VFS (for example, vfs_s_readdir(), which is used
- * in FISH) don't return "." and ".." entries.
+ * in SHELL) don't return "." and ".." entries.
*/
static int
check_dir_is_empty (const vfs_path_t * vpath)
@@ -2765,9 +2765,12 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx,
/* Query to remove short file */
if (query_dialog (Q_ ("DialogTitle|Copy"), _("Incomplete file was retrieved"),
D_ERROR, 2, _("&Delete"), _("&Keep")) == 0)
- mc_unlink (dst_vpath);
+ dst_status = DEST_SHORT_DELETE;
+ else
+ dst_status = DEST_SHORT_KEEP;
}
- else if (dst_status == DEST_SHORT_DELETE)
+
+ if (dst_status == DEST_SHORT_DELETE)
mc_unlink (dst_vpath);
else if (dst_status == DEST_FULL && !appending)
{
@@ -2812,9 +2815,11 @@ copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx,
src_mode = 0100666 & ~src_mode;
mc_chmod (dst_vpath, (src_mode & ctx->umask_kill));
}
+ }
+ /* Always sync timestamps */
+ if (dst_status == DEST_FULL || dst_status == DEST_SHORT_KEEP)
mc_utime (dst_vpath, &times);
- }
if (return_status == FILE_CONT)
return_status = progress_update_one (tctx, ctx, file_size);