Bug 20552

Summary: update-mime-database: better error message for missing directory
Product: shared-mime-info Reporter: Martin von Gagern <Martin.vGagern>
Component: generalAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: https://bugs.gentoo.org/show_bug.cgi?id=228885#c33
Whiteboard:
i915 platform: i915 features:
Attachments: access(mime_dir, F_OK) check

Description Martin von Gagern 2009-03-09 00:45:50 UTC
Created attachment 23672 [details] [review]
access(mime_dir, F_OK) check

When you try to run update-mime-database on a non-existant directory (due to type or someone suggesting you to run it like this), it tells you about missing write permissions and rerunning it as root. This can be kind of irritating if you already are root. It would be nice for the update-mime-database tool to check for existence of the directory prior to checking for writability, and issue a more fitting error message in the absence of the directory.
Comment 1 Bastien Nocera 2009-04-20 09:45:47 UTC
* update-mime-database.c (main): Patch from Martin von Gagern
<Martin.vGagern@gmx.net> to give a better error message when
a directory doesn't exist (Closes: #20552)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.