From dc2de0d0426cdca2e5ba6e29e65bfae6e577a483 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 19 Apr 2017 09:26:35 +0200 Subject: [RUN] Expand the paths found in /home/mkoedam/.local/bin/:/opt/mpd/bin/:/home/mkoedam/.local/bin/:/opt/mpd/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games --- source/dialogs/run.c | 4 +++- source/helper.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/dialogs/run.c b/source/dialogs/run.c index d596314e..a597abc1 100644 --- a/source/dialogs/run.c +++ b/source/dialogs/run.c @@ -231,7 +231,9 @@ static char ** get_apps ( unsigned int *length ) const char *const sep = ":"; char *strtok_savepointer = NULL; for ( const char *dirname = strtok_r ( path, sep, &strtok_savepointer ); dirname != NULL; dirname = strtok_r ( NULL, sep, &strtok_savepointer ) ) { - DIR *dir = opendir ( dirname ); + char *fpath = rofi_expand_path ( dirname ); + DIR *dir = opendir ( fpath ); + g_free ( fpath ); g_debug ( "Checking path %s for executable.", dirname ); if ( dir != NULL ) { diff --git a/source/helper.c b/source/helper.c index 42c52eb9..ac95252b 100644 --- a/source/helper.c +++ b/source/helper.c @@ -872,9 +872,9 @@ int rofi_scorer_fuzzy_evaluate ( const char *pattern, glong plen, const char *st // values suppress warnings. int uleft = 0, ulefts = 0, left, lefts; const gchar *pit = pattern, *sit; - enum CharClass prev = NON_WORD, cur; + enum CharClass prev = NON_WORD; for ( si = 0, sit = str; si < slen; si++, sit = g_utf8_next_char ( sit ) ) { - cur = rofi_scorer_get_character_class ( g_utf8_get_char ( sit ) ); + enum CharClass cur = rofi_scorer_get_character_class ( g_utf8_get_char ( sit ) ); score[si] = rofi_scorer_get_score_for ( prev, cur ); prev = cur; dp[si] = MIN_SCORE; -- cgit v1.2.3