GNOME Bugzilla – Bug 141509
"Can not open file" message shows file type "(null)"
Last modified: 2004-12-22 21:47:04 UTC
Steps to reproduce: 1. create a shell script and name it INSTALL 2. Double-click on it in Nautilus. You get the following message: ------------------ Cannot open INSTALL The filename "INSTALL" indicates that this file is of type "Software installation instructions". The contents of the file indicate that the file is of type "(null)". If you open this file, the file might present a security risk to your system. Do not open the file unless you created the file yourself, or received the file from a trusted source. To open the file, rename the file to the correct extension for "(null)", then open the file normally. Alternatively, use the Open With menu to choose a specific application for the file. -------------------- Yet, if you right-click on the file and choose "properties", it correctly shows file type as application/x-shellscript - not "(null)". And Nautilus uses shell script icon for the file.
Created attachment 29322 [details] Another example of this annoying bug Here's a similar example, where a "Windows Write" file (ironically, from the Bitstream Vera release tarball for GNOME) is correctly identified as a (more or less) Microsoft Word document -- but the ".wri" extension is "recognized" as "(null)." There are other examples. If Nautilus doesn't recognize the extension, I don't think we should be seeing this dialog. Likewise for filenames with no extension -- or which don't have an extension, but do happen to have a "." in the name ('Photo of 3.5" Floppy disc') ...
Created attachment 29760 [details] [review] Proposed patch. The problem is that some MIME types have no description, because Nautilus doesn't fetch the shared-mime-info description. Instead, it uses that from gnome-mime-info, which isn't always in sync with shared-mime-info. The patch aims to display the MIME type itself if no description is available.
I am rather ignorant, but is there a way to make Nautilus use the shared-mime-info description, thus eliminating the syncing problem??
You are far away from being ignorant :). That will be done in GNOME 2.8. But still, the issue remains that the description could be NULL. regs, Chris
Patch commited to cvs. Thanks.