]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't show messages for directories that can't be read
authorJulian Smart <julian@anthemion.co.uk>
Fri, 7 Dec 2007 08:58:49 +0000 (08:58 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 7 Dec 2007 08:58:49 +0000 (08:58 +0000)
since some users will think it's scanning their system

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/mimetype.cpp

index e85d76f28e95ac87a5dbbb3c5a5543eedafd93a9..04110d67c22177ee4b63dfb9562c7173ce54efff 100644 (file)
@@ -495,6 +495,9 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
     wxString dirname = dirbase;
     dirname << wxT("/mime-info");
 
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if ( !wxDir::Exists(dirname) )
         return;
 
@@ -887,6 +890,10 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 {
     wxFileName dirname(dirbase, wxEmptyString);
     dirname.AppendDir(subdir);
+
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     wxDir dir(dirname.GetPath());
     if(! dir.IsOpened())
         return;
@@ -914,6 +921,9 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirname,
                                             const wxArrayString& icondirs)
 {
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if(! wxDir::Exists(dirname))
         return;
 
@@ -1013,6 +1023,9 @@ void wxMimeTypesManagerImpl::LoadKDEApp(const wxString& filename)
 
 void wxMimeTypesManagerImpl::LoadKDEAppsFilesFromDir(const wxString& dirname)
 {
+    // Don't complain if we don't have permissions to read - it confuses users
+    wxLogNull logNull;
+
     if(! wxDir::Exists(dirname))
         return;
     wxDir dir(dirname);