Skip to content

Commit 48c69bb

Browse files
committed
svnbrowse: Rename svn_browse__item_t->relpath to name. It's only a name of that
directory, not a path to it. We still have to join those paths. * subversion/svnbrowse/svnbrowse.c (svn_browse__item_t): Rename field. (list_cb, view_draw, sub_main): Update references. git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1932743 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8c1afdd commit 48c69bb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

subversion/svnbrowse/svnbrowse.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define CTRL(ch) ((ch) - 'a' + 1)
4040

4141
typedef struct svn_browse__item_t {
42-
const char *relpath;
42+
const char *name;
4343
const svn_dirent_t *dirent;
4444
} svn_browse__item_t;
4545

@@ -78,7 +78,7 @@ list_cb(const char *relpath,
7878
{
7979
svn_browse__state_t *state = baton;
8080
svn_browse__item_t *item = apr_pcalloc(state->pool, sizeof(*item));
81-
item->relpath = svn_dirent_basename(relpath, state->pool);
81+
item->name = svn_dirent_basename(relpath, state->pool);
8282
item->dirent = svn_dirent_dup(dirent, state->pool);
8383
APR_ARRAY_PUSH(state->list, svn_browse__item_t *) = item;
8484
return SVN_NO_ERROR;
@@ -204,9 +204,9 @@ view_draw(svn_browse__view_t *view, apr_pool_t *pool)
204204
if (i == 0)
205205
mvprintw(i + 1, 0, "../");
206206
else if (item->dirent->kind == svn_node_dir)
207-
mvprintw(i + 1, 0, "%s/", item->relpath);
207+
mvprintw(i + 1, 0, "%s/", item->name);
208208
else if (item->dirent->kind == svn_node_file)
209-
mvprintw(i + 1, 0, "%s", item->relpath);
209+
mvprintw(i + 1, 0, "%s", item->name);
210210
else
211211
abort();
212212

@@ -282,7 +282,7 @@ sub_main(int *code, int argc, char *argv[], apr_pool_t *pool)
282282
case '\r':
283283
item = APR_ARRAY_IDX(ctx->current->list, ctx->current->selection,
284284
svn_browse__item_t *);
285-
new_url = svn_relpath_join(ctx->current->relpath, item->relpath,
285+
new_url = svn_relpath_join(ctx->current->relpath, item->name,
286286
iterpool);
287287
SVN_ERR(enter_path(ctx, new_url, iterpool));
288288
break;

0 commit comments

Comments
 (0)