[Portland] [Bug 7123] xdg-mime has inconsistant output for error cases

bugzilla-daemon at annarchy.freedesktop.org bugzilla-daemon at annarchy.freedesktop.org
Sat Jun 10 10:42:40 PDT 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=7123          
     




------- Additional Comments From bryce at bryceharrington.org  2006-06-10 10:42 -------
Okay, the original cases described seem okay:

1.  
 $ ./xdg-mime query filetype foo.bar
 Error:  You must specify an existing file.

2.  
 $ touch foo.bar
 $ ./xdg-mime query filetype foo.bar
 application/x-zerosize

3.
 # chmod 000 foo.bar
 $ ./xdg-mime query filetype foo.bar
 application/x-zerosize

However, according to the man page, xdg-mime also supports a 'default'
parameter, and this seems to be misbehaving:

 $ rm foo.bar
 $ ./xdg-mime query default foo.bar
 Error:  You must specify an existing file.

 $ touch foo.bar
 $ ./xdg-mime query default foo.bar
 basename: missing operand
 Try `basename --help' for more information.

 $ file foo.bar
 foo.bar: empty

But it seems okay with valid file content:

 $ echo 'hello world' > foo.bar 
 $ file foo.bar 
 $ ./xdg-mime query default foo.bar
 kwrite.desktop
 $ file foo.bar 
 foo.bar: ASCII text


          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Portland mailing list