1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

[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

This commit is contained in:
Dave Davenport 2017-04-19 09:26:35 +02:00
parent 854304ca2f
commit dc2de0d042
2 changed files with 5 additions and 3 deletions

View file

@ -231,7 +231,9 @@ static char ** get_apps ( unsigned int *length )
const char *const sep = ":"; const char *const sep = ":";
char *strtok_savepointer = NULL; char *strtok_savepointer = NULL;
for ( const char *dirname = strtok_r ( path, sep, &strtok_savepointer ); dirname != NULL; dirname = strtok_r ( NULL, sep, &strtok_savepointer ) ) { 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 ); g_debug ( "Checking path %s for executable.", dirname );
if ( dir != NULL ) { if ( dir != NULL ) {

View file

@ -872,9 +872,9 @@ int rofi_scorer_fuzzy_evaluate ( const char *pattern, glong plen, const char *st
// values suppress warnings. // values suppress warnings.
int uleft = 0, ulefts = 0, left, lefts; int uleft = 0, ulefts = 0, left, lefts;
const gchar *pit = pattern, *sit; 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 ) ) { 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 ); score[si] = rofi_scorer_get_score_for ( prev, cur );
prev = cur; prev = cur;
dp[si] = MIN_SCORE; dp[si] = MIN_SCORE;