! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo-open tries to open a directory with an email program
Status:
RESOLVED: FIXED

Comments

Description Forest 2008-08-28 06:36:59 CEST
exo-open fails to open certain directories on my file system, namely those with email addresses in their names.  If I run exo-open /home/forest/foo, it correctly opens a Thunar window to that directory.  If I run exo-open /home/forest/foo@bar.com, it launches my email program, which (of course) fails to do anything useful.

I noticed this because it seems to be the cause of Ubuntu's Tracker search tool failing to open my jabber (google talk) message log directories, which are created by pidgin.
Comment 1 Jannis Pohlmann editbugs 2008-10-02 12:31:14 CEST
Created attachment 1861 
Patch to add ^ and $ to the regular expressions

This patch prepends ^ and appends $ to MATCH_BROWSER1, MATCH_BROWSER2 and MATCH_MAILER. This should fix the bug. The only downside is that leading and trailing whitespace now matter (I don't know whether that's important or not).
Comment 2 Jannis Pohlmann editbugs 2008-11-03 16:27:59 CET
I've committed the patch together with another modification. This modification moves the check whether the URL is a local filename to the top of the function which launches the URL instead of checking the regular expressions first (revision 28598):

  commit 9b00b75a026f35413670e01ec726712ad9a039e1
  Author: Jannis Pohlmann <info@sten-net.de>
  Date:   Mon Nov 3 16:20:56 2008 +0000

          * exo/exo-url.c: Check whether the given URL can be transformed into
            a local filename before going through the regular expressions for
            email addresses and browser URLs. Also don't allow additional
            characters before and after email addresses and browser URLs. This
            handles filenames with @ properly and should fix bug #4330.
      
      git-svn-id: https://svn.xfce.org/svn/xfce/libexo/trunk@28598 a0aa69c2-05f4-0310-b83c-d5d913b14636

  :100644 100644 7bce687... aa601c6... M  ChangeLog
  :100644 100644 c2f434d... efb5129... M  exo/exo-url.c
Comment 3 Nick Schermer editbugs 2009-08-26 06:40:11 CEST
Fixed.

Bug #4330

Reported by:
Forest
Reported on: 2008-08-28
Last modified on: 2009-10-09

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information