diff options
Diffstat (limited to 'src/firecfg')
-rw-r--r-- | src/firecfg/desktop_files.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/firecfg/desktop_files.c b/src/firecfg/desktop_files.c index 7ac60f70c..5ed15c02b 100644 --- a/src/firecfg/desktop_files.c +++ b/src/firecfg/desktop_files.c | |||
@@ -163,7 +163,8 @@ void fix_desktop_files(const char *homedir) { | |||
163 | // copy | 163 | // copy |
164 | struct dirent *entry; | 164 | struct dirent *entry; |
165 | while ((entry = readdir(dir)) != NULL) { | 165 | while ((entry = readdir(dir)) != NULL) { |
166 | if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) | 166 | const char *filename = entry->d_name; |
167 | if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0) | ||
167 | continue; | 168 | continue; |
168 | 169 | ||
169 | // skip if not regular file or link | 170 | // skip if not regular file or link |
@@ -172,11 +173,9 @@ void fix_desktop_files(const char *homedir) { | |||
172 | continue; | 173 | continue; |
173 | 174 | ||
174 | // skip if not .desktop file | 175 | // skip if not .desktop file |
175 | if (strstr(entry->d_name,".desktop") != (entry->d_name+strlen(entry->d_name)-8)) | 176 | if (strstr(filename, ".desktop") != (filename + strlen(filename) - 8)) |
176 | continue; | 177 | continue; |
177 | 178 | ||
178 | char *filename = entry->d_name; | ||
179 | |||
180 | // skip links - Discord on Arch #4235 seems to be a symlink to /opt directory | 179 | // skip links - Discord on Arch #4235 seems to be a symlink to /opt directory |
181 | // if (is_link(filename)) | 180 | // if (is_link(filename)) |
182 | // continue; | 181 | // continue; |