[DRun] Fix parsing subdirectories because of wrong suffix check

This commit is contained in:
Dave Davenport 2016-10-16 14:49:32 +02:00
parent cdb1b96414
commit 703426716a
1 changed files with 5 additions and 4 deletions

View File

@ -339,10 +339,6 @@ static void walk_dir ( DRunModePrivateData *pd, const char *root, const char *di
if ( file->d_name[0] == '.' ) {
continue;
}
// Skip files not ending on .desktop.
if ( !g_str_has_suffix ( file->d_name, ".desktop" ) ) {
continue;
}
switch ( file->d_type )
{
case DT_LNK:
@ -368,6 +364,11 @@ static void walk_dir ( DRunModePrivateData *pd, const char *root, const char *di
}
}
}
// Skip files not ending on .desktop.
if ( file->d_type != DT_DIR && !g_str_has_suffix ( file->d_name, ".desktop" ) ) {
g_free(filename);
continue;
}
switch ( file->d_type )
{