Bug 107170 - sometimes "[]" should not be treated as wildcard
Summary: sometimes "[]" should not be treated as wildcard
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 107673 108130 109757 109930 110001 110012 110050 110277 110287 110373 111104 113683 115301 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-10 15:40 UTC by LuRan
Modified: 2005-10-29 15:23 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LuRan 2005-06-10 15:40:40 UTC
Version:           recent SVN snapshot (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.4.4 with gentoo patches
OS:                Linux

I have some movie files with names like "[xx]yyyy.avi", when I tried to open it by click in konqueror, the filename has been stripped as wildcard. As a result, the player will get a url with only the path, thus cannot play the file.
Comment 1 Thiago Macieira 2005-06-10 15:50:36 UTC
Confirmed, trunk 414026.
Comment 2 Thiago Macieira 2005-06-18 18:45:20 UTC
*** Bug 107673 has been marked as a duplicate of this bug. ***
Comment 3 Thiago Macieira 2005-06-26 18:29:13 UTC
*** Bug 108130 has been marked as a duplicate of this bug. ***
Comment 4 Thiago Macieira 2005-06-26 18:29:34 UTC
Raising severity.
Comment 5 Tommi Tervo 2005-07-28 10:36:34 UTC
*** Bug 109757 has been marked as a duplicate of this bug. ***
Comment 6 Nick Steeves 2005-07-29 04:04:15 UTC
From what I've seen in Bug 109757, Xine and noatun properly get the file URL.  Isn't it strange that they work ok?
Comment 7 Guido Winkelmann 2005-07-29 14:21:10 UTC
@ #6:

Not really. See bug number 108130 (which is a duplicate of this one, see link in comment #3) which explains it quite well. It seems to depend on whether you left-click on the file to open it with the default app or whether you right-click and choose one from the options.
Comment 8 Nick Steeves 2005-07-29 21:26:24 UTC
ah, you're right.  I double checked Xine and noatun behavior, and it turns out that they were being sent the directory, but had cached the right-click file in their playlist, and found an avi to play in this way.  I hadn't noticed that they were always playing the same avi, no matter which file I clicked on.  I was left-clicking, but didn't realize that the playlists had cached a file from an earlier right-click.
Comment 9 Nick Steeves 2005-07-30 06:31:03 UTC
Today I encountered a dir which ended with the "?" character.  It behaved the same as the directory in bug 107673.
Comment 10 Gleb Litvjak 2005-07-30 18:24:53 UTC
Having the same problem. Moreover, if a directory has [ or ] in its name, konqueror doesn't want to enter it.
Comment 11 Guido Winkelmann 2005-07-30 19:00:51 UTC
#10:

I cannot confirm this. Over here, the problem only happens if the file- or directory-name contains any of "[", "?", or "*".

If it doesn't contain any of those but does contain a "]", the bug doesn't show. (i.e. I can enter the directory/open the file.)
Comment 12 LuRan 2005-07-31 03:31:14 UTC
I did this in konq_mainwindow.cc:

@@ -423,7 +423,7 @@
         }
         QString fileName = path.mid( lastSlash + 1 );
         QString testPath = path.left( lastSlash + 1 );
-        if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
+        if ( ( fileName.find( '*' ) != -1 || fileName.find( '?' ) != -1 )
              && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
         {
             nameFilter = fileName;

and now I have no problem with file with "[]" in its name. I don't think it's a fix, just a dirty hack
Comment 13 Dirk Mueller 2005-07-31 13:34:19 UTC
*** Bug 109930 has been marked as a duplicate of this bug. ***
Comment 14 blueskyinspain 2005-07-31 19:17:26 UTC
" ------- Additional Comment #10 From Gleb Litvjak 2005-07-30 18:24 -------  
Having the same problem. Moreover, if a directory has [ or ] in its name, konqueror doesn't want to enter it. "

I confirm! I have a lot of directories with the [ and ] characters and since KDE/Konqueror 3.4.2, Konqueror doesn't want to enter those directories. Nautilus does it right.

Ugh*
Comment 15 Teemu Rytilahti 2005-07-31 21:15:00 UTC
Yup, I can confirm too. Btw, opening via "Open with" works fine.
Comment 16 Thiago Macieira 2005-08-02 04:59:43 UTC
*** Bug 110001 has been marked as a duplicate of this bug. ***
Comment 17 Tommi Tervo 2005-08-02 09:24:34 UTC
*** Bug 110012 has been marked as a duplicate of this bug. ***
Comment 18 Thiago Macieira 2005-08-03 05:00:59 UTC
*** Bug 110050 has been marked as a duplicate of this bug. ***
Comment 19 John E 2005-08-03 23:45:55 UTC
Confirming the bug here.
Comment 20 Michael Nottebrock 2005-08-05 03:03:43 UTC
I just noticed that wildcards in the location bar don't work at all anymore in any of the filemanager views, too! :-( :-( :-(

(Example: ~/*.mp3 in detailed list view)

Is that related, perhaps? If not, I'll open another bug.
Comment 21 Pascal Létourneau 2005-08-05 21:19:14 UTC
SVN commit 443311 by pletourn:

If a fileName exits, don't try to detect a name filter

BUG:110227
BUG:107170


 M  +1 -1      konq_mainwindow.cc  


--- branches/KDE/3.4/kdebase/konqueror/konq_mainwindow.cc #443310:443311
@@ -428,7 +428,7 @@
         QString fileName = path.mid( lastSlash + 1 );
         QString testPath = path.left( lastSlash + 1 );
         if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
-             && ( !url.isLocalFile() || QFile::exists( testPath ) ) )
+             && ( !url.isLocalFile() || QFile::exists( testPath ) ) && !KIO::NetAccess::exists( url, true ) )
         {
             nameFilter = fileName;
             url.setFileName( QString::null );
Comment 22 Nick Steeves 2005-08-06 02:04:25 UTC
Is there any chance that this will be backported to KDE-3.4.2?  I encountered a compilation error after applying this patch to kdebase-3.4.2 in the NetAccess bit.
Comment 23 Michael Nottebrock 2005-08-06 02:25:46 UTC
 #include <kprocess.h>
+#include <kio/netaccess.h>
 #include <kio/scheduler.h>

in the same file will make it compile.
Comment 24 Nick Steeves 2005-08-06 06:01:56 UTC
Thanks for the tip Michael.  From what I've seen so far, this fix looks great.  :-)
Comment 25 Tommi Tervo 2005-08-06 11:02:31 UTC
*** Bug 110277 has been marked as a duplicate of this bug. ***
Comment 26 Maksim Orlovich 2005-08-06 18:12:53 UTC
*** Bug 110287 has been marked as a duplicate of this bug. ***
Comment 27 Thiago Macieira 2005-08-07 06:31:18 UTC
Can someone confirm the fix for KDE 3.4.2? We'll have a KDE 3.4.3 release and I'd like to backport.
Comment 28 Michael Nottebrock 2005-08-07 07:32:47 UTC
I confirm, but don't bother, it already is backported. :-)
Comment 29 sum_of_the_total 2005-08-09 01:33:51 UTC
does it fix {} these brackets too?
Comment 30 Thiago Macieira 2005-08-09 01:45:52 UTC
> does it fix {} these brackets too? 

Yes, I've just tested.
Comment 31 illogic-al 2005-08-09 07:00:09 UTC
I don't think this was backported for 3.4.2 (as it says in comment #28) I still have the problem of not being able to enter directories with [] characters in the name (comment #10). I don't know if it's fixed in branch so I'll leave closed (for now).
Comment 32 Thiago Macieira 2005-08-09 07:09:59 UTC
Let me rephrase comment #27: "can someone confirm the fix works for KDE 3.4.2? I want to add it to KDE 3.4.3", to which it was answered: "yes, it works, it was backported".

So, the fix isn't in KDE 3.4.2 because it was released before the fix happened. You have to either patch it or wait for KDE 3.4.3.
Comment 33 Thiago Macieira 2005-08-10 03:18:34 UTC
*** Bug 110373 has been marked as a duplicate of this bug. ***
Comment 34 Maksim Orlovich 2005-08-19 19:10:23 UTC
*** Bug 111104 has been marked as a duplicate of this bug. ***
Comment 35 Maksim Orlovich 2005-10-01 20:11:18 UTC
*** Bug 113683 has been marked as a duplicate of this bug. ***
Comment 36 Thiago Macieira 2005-10-29 15:23:03 UTC
*** Bug 115301 has been marked as a duplicate of this bug. ***