xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 8df77c0139ea22692971e47f93b39fa365049ead

Fix incorrect progress indicator for dp and do
Actually enqueue the list of files that's about to be processed and then
advance over it. Fake entries should not be a problem, really only
interestested in the number.

Update of fops_progress_msg() in fops_replace_entry() is for
'nosyscalls' case, which otherwise reports "1 of 1" regardless of the
number of files being processed.

Thanks to aleksejrs.

Fixes #1136 on GitHub.
Author: xaizek
Author date (UTC): 2026-03-12 10:12
Committer name: xaizek
Committer date (UTC): 2026-03-12 10:18
Parent(s): 7533ff89d66dccabe496482c5679ff9d81c5f3f7
Signing key: 99DC5E4DB05F6BE2
Tree: 80f53479a62203262e9a44f04acf96a6725c9bd9
File Lines added Lines deleted
ChangeLog 3 0
src/compare.c 15 1
src/fops_cpmv.c 1 1
File ChangeLog changed (mode: 100644) (index 3b6f513ef..92873de46)
200 200 Fixed undoing of chmod operation not restoring owner's read permission. Fixed undoing of chmod operation not restoring owner's read permission.
201 201 Thanks to aleksejrs. Patch by Kirill Rekhov. Thanks to aleksejrs. Patch by Kirill Rekhov.
202 202
203 Fixed incorrect progress indicator for dp and do keys in compare view.
204 Thanks to aleksejrs.
205
203 206 0.14-beta to 0.14 (2025-02-08) 0.14-beta to 0.14 (2025-02-08)
204 207
205 208 Improved documentation on zh/zl menu keys a bit. Improved documentation on zh/zl menu keys a bit.
File src/compare.c changed (mode: 100644) (index 6616503f0..2afeb57d3)
... ... compare_move(view_t *from, view_t *to)
1261 1261 return 1; return 1;
1262 1262 } }
1263 1263
1264 /* curr_view is used here and below because the from parameter can be equal to
1265 * either curr_view or other_view and the operation is framed in terms of the
1266 * current view. */
1267 dir_entry_t *entry = NULL;
1268 while(iter_selection_or_current_any(curr_view, &entry) && fops_active(ops))
1269 {
1270 char path[PATH_MAX + 1];
1271 get_full_path_of(entry, sizeof(path), path);
1272 ops_enqueue(ops, path, flist_get_dir(to), /*deep=*/0);
1273 }
1274
1264 1275 /* We're going at least to try to update one of the views (which might refer /* We're going at least to try to update one of the views (which might refer
1265 1276 * to the same directory), so schedule a reload. */ * to the same directory), so schedule a reload. */
1266 1277 ui_view_schedule_reload(from); ui_view_schedule_reload(from);
 
... ... compare_move(view_t *from, view_t *to)
1268 1279
1269 1280 un_group_open(undo_msg); un_group_open(undo_msg);
1270 1281
1271 dir_entry_t *entry = NULL;
1282 entry = NULL;
1272 1283 while(iter_selection_or_current_any(curr_view, &entry) && fops_active(ops)) while(iter_selection_or_current_any(curr_view, &entry) && fops_active(ops))
1273 1284 { {
1274 1285 compare_move_entry(ops, from, to, entry_to_pos(curr_view, entry)); compare_move_entry(ops, from, to, entry_to_pos(curr_view, entry));
1286
1287 /* Assume a success, only interested in incrementing the counter. */
1288 ops_advance(ops, /*succeeded=*/1);
1275 1289 } }
1276 1290
1277 1291 un_group_close(); un_group_close();
File src/fops_cpmv.c changed (mode: 100644) (index 549224f0d..a8e52dd10)
... ... fops_replace_entry(ops_t *ops, view_t *src, const dir_entry_t *src_entry,
255 255 fops_delete_entry(ops, dst, dst_entry, /*use_trash=*/1, /*nested=*/1); fops_delete_entry(ops, dst, dst_entry, /*use_trash=*/1, /*nested=*/1);
256 256 } }
257 257
258 fops_progress_msg("Copying files", 0, 1);
258 fops_progress_msg("Copying files", ops->current, ops->total);
259 259
260 260 void *flags = ops_flags(DF_MAKE_PARENTS); void *flags = ops_flags(DF_MAKE_PARENTS);
261 261 if(fops_active(ops) && !is_valid_dir(dst_dir) && if(fops_active(ops) && !is_valid_dir(dst_dir) &&
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master