From 5c6f057840644029f9cc5bd12f8083e07836031f Mon Sep 17 00:00:00 2001 From: Yorhel <git@yorhel.nl> Date: Thu, 23 Apr 2009 22:03:24 +0200 Subject: [PATCH] Fixed a few occurences of wrong arguments for getpath() That's what you get when you change the way a function works... --- src/browser.c | 6 +++--- src/delete.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/browser.c b/src/browser.c index 596f29d..86c5cd9 100644 --- a/src/browser.c +++ b/src/browser.c @@ -145,7 +145,7 @@ void browse_draw_info(struct dir *dr) { attroff(A_BOLD); 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" : dr->flags & FF_FILE ? "File" : "Other (link, device, socket, ..)"); ncprint(6, 18, "%s (%s B)", formatsize(dr->size), fullsize(dr->size)); @@ -248,7 +248,7 @@ int browse_draw() { mvhline(1, 0, '-', wincols); if(cur) { mvaddch(1, 3, ' '); - tmp2 = getpath(cur); + tmp2 = getpath(cur->parent); mvaddstr(1, 4, cropstr(tmp2, wincols-8)); mvaddch(1, 4+((int)strlen(tmp2) > wincols-8 ? wincols-8 : (int)strlen(tmp2)), ' '); } @@ -416,7 +416,7 @@ int browse_key(int ch) { /* refresh */ case 'r': - calc_init(getpath(browse_dir), browse_dir->parent); + calc_init(getpath(browse_dir->parent), browse_dir->parent); nonfo++; sort++; break; diff --git a/src/delete.c b/src/delete.c index 502e436..7193021 100644 --- a/src/delete.c +++ b/src/delete.c @@ -191,7 +191,7 @@ int delete_dir(struct dir *dr) { char *path; /* calling path_chdir() this often isn't exactly efficient... */ - path = getpath(dr->sub); + path = getpath(dr->parent); path_chdir(path); /* check for input or screen resizes */ -- GitLab