mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-27 06:47:23 +02:00
Remove unnecessary file existence check in GMenu2X::showSettings()
Browsing the user's translations directory will simply add no new files to the list of translations available if the directory doesn't exist. GMenu2X::showSettings() doesn't need to care about that. Because translations are files, not directories, also don't return directories in the result. The code that makes the translations list calls FileLister::getFiles and ignores directories anyway.
This commit is contained in:
parent
a60a529de6
commit
cf896e6175
@ -676,12 +676,9 @@ void GMenu2X::showSettings() {
|
||||
#endif
|
||||
|
||||
FileLister fl_tr;
|
||||
fl_tr.setShowDirectories(false);
|
||||
fl_tr.browse(GMENU2X_SYSTEM_DIR "/translations");
|
||||
|
||||
string tr_path = getHome() + "/translations";
|
||||
if (fileExists(tr_path)) {
|
||||
fl_tr.browse(tr_path, false);
|
||||
}
|
||||
fl_tr.browse(getHome() + "/translations", false);
|
||||
|
||||
fl_tr.insertFile("English");
|
||||
string lang = tr.lang();
|
||||
|
Loading…
Reference in New Issue
Block a user