Search for Files cannot search for question marks

Bug #190661 reported by Pete Myers
4
Affects Status Importance Assigned to Milestone
gnome-utils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce:
Create a file called "Can you find me?.txt"
Open Places->Search for Files
Try searching for a file containing a question mark, using either \? or *\?*. The search returns nothing, however the command line:
> find . -name '*\?*' -print
...does find the file.

When the backslash functionality has been added, this should be included in the Help file.

Revision history for this message
Pete Myers (petemyers) wrote :

Forgot to add:
Some relevant forum threads:

http://ubuntuforums.org/showthread.php?p=4304659#post4304659
http://ubuntuforums.org/showthread.php?t=665860&highlight=question+mark

When copying lots of files to a Windows partition (e.g. external drive, or USB stick), Ubuntu should probably respond better than touting undiscernable error messages (like give you the option to rename the file)

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

package-hint: gnome-applets

Thanks for the report. I can not confirm this on Hardy. I created a file in my home folder with a question mark and searched for it successfully. Judging from your additional comment, should I assume you mean the file you were searching for was on a
Windows partition?

Revision history for this message
Pete Myers (petemyers) wrote :

Andrew, an attempt to be a little clearer, and answer some of your questions:

No search program would find a file with a question mark on a windows partition as FAT doesn't support it (don't know about NTFS). But, there is a file with a question mark on an ext3 partition, and if you attempt to copy that file to a FAT partition, then Ubuntu gives you an error... this is because ext3 does support question marks in file names, but FAT doesn't. This is likely to be a problem for more users, as most USB sticks or external hard drives will probably be formatted with FAT rather than ext3.

Finding all the files on the ext3 partition that contain characters that are forbidden on a FAT partition means searching for files containing the character '?' on the ext3 partition, so that the file names can be changed.

I am using Gutsy, and in Gutsy the character '?' gets treated as a wildcard rather than as a character (in the Places->Search for Files applet)... and the regular expression '\?' or '*\?*' doesn't work - the '?' is still treated as a wildcard. This is not the case with the command line program 'find', which does find files the character '?' using the syntax of \?.

You mention that you've not had the same problem searching in Hardy - are you *just* searching for the character '?'... because if you are searching for something else as well, then it's not a proper test, for example:

with filename: somefile?.txt
My Gutsy Search for Files will *not* find this file when I search for: '?', '\?', '*\?*', 'file?'
It *will* find this file when I search for: 'file', '*file?*', and '*?*' (but this last one returns *every* file)

These tests show that the character '?' is *always* treated as a wildcard in the Gutsy Search for Files applet.

If you get different results in Hardy - and are able to find files *because* they contain the character '?', then the problem may have been fixed upstream in Gnome. If not, then this is still a bug in Hardy.

Hope that helps.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Thanks for the clarification. I can now confirm that this issue is still present on Hardy. In a directory containing the files: "new file 1" "new file 2" and "new file ?" searching for "new file ?" will return all three files in its results.

Changed in gnome-utils:
status: New → Confirmed
Revision history for this message
Pete Myers (petemyers) wrote :

After a little searching, I found a program called gnome-find which basically solves all of the feature problems of the search for files applet:

http://gnome-find.sourceforge.net/

It's looks pig-ugly... but it seems like the stuff under the hood is all that's needed in search for files, with a little tab saying "advanced" that presents all those choices and options.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

Changed in gnome-utils:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.