diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
commit | a6f3675fc4e21b3f899286b9a02005368d913f74 (patch) | |
tree | c9bfa92b223783ff03b8e941c3bb0d36c68d3b5e /src/filemanager/file.c | |
parent | Releasing progress-linux version 3:4.8.30-1~progress7.99u1. (diff) | |
download | mc-a6f3675fc4e21b3f899286b9a02005368d913f74.tar.xz mc-a6f3675fc4e21b3f899286b9a02005368d913f74.zip |
Merging upstream version 3:4.8.31.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/filemanager/file.c')
-rw-r--r-- | src/filemanager/file.c | 15 |
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, ×); - } if (return_status == FILE_CONT) return_status = progress_update_one (tctx, ctx, file_size); |