Skip to content
Snippets Groups Projects
Commit 5c6f0578 authored by Yorhel's avatar Yorhel
Browse files

Fixed a few occurences of wrong arguments for getpath()

That's what you get when you change the way a function works...
parent 4bb7d6b7
Branches
Tags
No related merge requests found
...@@ -145,7 +145,7 @@ void browse_draw_info(struct dir *dr) { ...@@ -145,7 +145,7 @@ void browse_draw_info(struct dir *dr) {
attroff(A_BOLD); attroff(A_BOLD);
ncaddstr(2, 9, cropstr(dr->name, 49)); ncaddstr(2, 9, cropstr(dr->name, 49));
ncaddstr(3, 9, cropstr(getpath(dr), 49)); ncaddstr(3, 9, cropstr(getpath(dr->parent), 49));
ncaddstr(4, 9, dr->flags & FF_DIR ? "Directory" ncaddstr(4, 9, dr->flags & FF_DIR ? "Directory"
: dr->flags & FF_FILE ? "File" : "Other (link, device, socket, ..)"); : dr->flags & FF_FILE ? "File" : "Other (link, device, socket, ..)");
ncprint(6, 18, "%s (%s B)", formatsize(dr->size), fullsize(dr->size)); ncprint(6, 18, "%s (%s B)", formatsize(dr->size), fullsize(dr->size));
...@@ -248,7 +248,7 @@ int browse_draw() { ...@@ -248,7 +248,7 @@ int browse_draw() {
mvhline(1, 0, '-', wincols); mvhline(1, 0, '-', wincols);
if(cur) { if(cur) {
mvaddch(1, 3, ' '); mvaddch(1, 3, ' ');
tmp2 = getpath(cur); tmp2 = getpath(cur->parent);
mvaddstr(1, 4, cropstr(tmp2, wincols-8)); mvaddstr(1, 4, cropstr(tmp2, wincols-8));
mvaddch(1, 4+((int)strlen(tmp2) > wincols-8 ? wincols-8 : (int)strlen(tmp2)), ' '); mvaddch(1, 4+((int)strlen(tmp2) > wincols-8 ? wincols-8 : (int)strlen(tmp2)), ' ');
} }
...@@ -416,7 +416,7 @@ int browse_key(int ch) { ...@@ -416,7 +416,7 @@ int browse_key(int ch) {
/* refresh */ /* refresh */
case 'r': case 'r':
calc_init(getpath(browse_dir), browse_dir->parent); calc_init(getpath(browse_dir->parent), browse_dir->parent);
nonfo++; nonfo++;
sort++; sort++;
break; break;
......
...@@ -191,7 +191,7 @@ int delete_dir(struct dir *dr) { ...@@ -191,7 +191,7 @@ int delete_dir(struct dir *dr) {
char *path; char *path;
/* calling path_chdir() this often isn't exactly efficient... */ /* calling path_chdir() this often isn't exactly efficient... */
path = getpath(dr->sub); path = getpath(dr->parent);
path_chdir(path); path_chdir(path);
/* check for input or screen resizes */ /* check for input or screen resizes */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment