From 44d27b05e75aff8e4d304847c60d143eb9f33814 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 23 Sep 2016 13:48:40 -0400 Subject: 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. --- src-qt5/core/libLumina/LuminaXDG.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp') 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; } -- cgit