summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-04-19 09:26:35 +0200
committerDave Davenport <qball@gmpclient.org>2017-04-19 09:26:35 +0200
commitdc2de0d0426cdca2e5ba6e29e65bfae6e577a483 (patch)
tree4b1809e0889614c2336612de0e595a20e018d2db /source
parent854304ca2f32c38f06a25ff0710af098a5d120be (diff)
[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
Diffstat (limited to 'source')
-rw-r--r--source/dialogs/run.c4
-rw-r--r--source/helper.c4
2 files changed, 5 insertions, 3 deletions
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;