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 9a1f6a2f1288447dc2b9ee7f29355555b9b887f0

Fix ga and gA
Use full paths for them. They were broken with recent reducing of
number of chdir() calls.
Author: xaizek
Author date (UTC): 2011-09-28 10:18
Committer name: xaizek
Committer date (UTC): 2011-09-28 10:18
Parent(s): 7555cc08ae04bcdf0152cd602067bf290eddb32c
Signing key:
Tree: 88f04972491e5eea4a11b397a279311299bcc33f
File Lines added Lines deleted
src/normal.c 10 2
File src/normal.c changed (mode: 100644) (index d3ab80551..49f294ae1)
... ... cmd_G(struct key_info key_info, struct keys_info *keys_info)
759 759 static void static void
760 760 cmd_gA(struct key_info key_info, struct keys_info *keys_info) cmd_gA(struct key_info key_info, struct keys_info *keys_info)
761 761 { {
762 char full_path[PATH_MAX];
763
762 764 if(curr_view->dir_entry[curr_view->list_pos].type != DIRECTORY) if(curr_view->dir_entry[curr_view->list_pos].type != DIRECTORY)
763 765 return; return;
764 766
765 767 status_bar_message("Calculating directory size..."); status_bar_message("Calculating directory size...");
766 768 wrefresh(status_bar); wrefresh(status_bar);
767 769
768 calc_dirsize(curr_view->dir_entry[curr_view->list_pos].name, 1);
770 snprintf(full_path, sizeof(full_path), "%s/%s", curr_view->curr_dir,
771 curr_view->dir_entry[curr_view->list_pos].name);
772 calc_dirsize(full_path, 1);
769 773
770 774 redraw_lists(); redraw_lists();
771 775 } }
 
... ... cmd_gA(struct key_info key_info, struct keys_info *keys_info)
773 777 static void static void
774 778 cmd_ga(struct key_info key_info, struct keys_info *keys_info) cmd_ga(struct key_info key_info, struct keys_info *keys_info)
775 779 { {
780 char full_path[PATH_MAX];
781
776 782 if(curr_view->dir_entry[curr_view->list_pos].type != DIRECTORY) if(curr_view->dir_entry[curr_view->list_pos].type != DIRECTORY)
777 783 return; return;
778 784
779 785 status_bar_message("Calculating directory size..."); status_bar_message("Calculating directory size...");
780 786 wrefresh(status_bar); wrefresh(status_bar);
781 787
782 calc_dirsize(curr_view->dir_entry[curr_view->list_pos].name, 0);
788 snprintf(full_path, sizeof(full_path), "%s/%s", curr_view->curr_dir,
789 curr_view->dir_entry[curr_view->list_pos].name);
790 calc_dirsize(full_path, 0);
783 791
784 792 redraw_lists(); redraw_lists();
785 793 } }
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