diff options
author | Ken Moore <ken@pcbsd.org> | 2016-09-23 13:48:40 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2016-09-23 13:48:40 -0400 |
commit | 44d27b05e75aff8e4d304847c60d143eb9f33814 (patch) | |
tree | 274fec570518fee40e39dc2d5f55bd29440bf620 /src-qt5/core/libLumina/LuminaXDG.cpp | |
parent | Clean up a bit of the start menu/button. (diff) | |
download | lumina-44d27b05e75aff8e4d304847c60d143eb9f33814.tar.gz lumina-44d27b05e75aff8e4d304847c60d143eb9f33814.tar.bz2 lumina-44d27b05e75aff8e4d304847c60d143eb9f33814.zip |
Add a new file to be distributed with Lumina:
Include a copy of the "globs2" file from the FreeDesktop mimetype database, to be used as a fallback if the official mimetype database is not installed/found on the system.
Also adjust the mimetype loader to use this fallback as needed.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index d89c7f46..96f77ff9 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -1499,7 +1499,11 @@ QStringList LXDG::loadMimeFileGlobs2(){ } file.close(); } - } + if(i==dirs.length()-1 && mimeglobs.isEmpty()){ + //Could not find the mimetype database on the system - use the fallback file distributed with Lumina + dirs << LOS::LuminaShare(); + } + }//end loop over dirs } return mimeglobs; } |