After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322799 - Filenames containing a colon (e.g. foo:bar.gnumeric) results in "Invalid URI"
Filenames containing a colon (e.g. foo:bar.gnumeric) results in "Invalid URI"
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: General
unspecified
Other All
: Normal minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-11-30 03:18 UTC by Joseph Pingenot
Modified: 2005-12-02 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joseph Pingenot 2005-11-30 03:18:12 UTC
Please describe the problem:
When opening a file containing a colon in its filename (e.g.
e:1.25_r:11_h:v.gnumeric) from the command line (e.g. "gnumeric
e:1.25_r:11_h:v.gnumeric"), one only gets an error stating "Invalid URI", not
the file.  Gnumeric then proceeds to open a new workbook, not the requested
workbook, and one must select the file from the file chooser.

Steps to reproduce:
1. Create file containing a colon in its name
2. Start gnumeric with it as an argument
3. Cry over "distinct lack of joy"


Actual results:
What actually happens when I follow these steps: misery, and maybe poverty, if
my time is truly worth money as They claim.

Expected results:
I expect gnumeric to open the spreadsheet.

Does this happen every time?
Yes.

Other information:
Workaround: open the file with the following command:

gnumeric file://`pwd`/file:containing:colons.gnumeric

and it will open fine.
Comment 1 Joseph Pingenot 2005-11-30 03:23:18 UTC
Thinking about the security ramifications of URIs and filename conflicts, I
recommend the following course of action regarding URIs:

1) If a parameter passed as a potential URI contains a colon, check to see if
it's a valid URI
2) If a valid URI, check to see if a file exists with the specified name.
    I) If no such file exists, use it as a URI
    II) If such a file exists, alert the user and ask him/her what to do.
3) If NOT a valid URI, it's a filename.
Comment 2 Morten Welinder 2005-11-30 15:48:39 UTC
We currently just use gnome-vfs's function for this.  The problem is that
it is designed for general URLs, not just the protocols that gnome-vfs
can handle.  URLs can be very, very general.

We cannot rely on user interaction.  This has to work for the command line
too.

I do not think we want to test for file existance.  It would work for the
read side, but not for the write side.  That would be very confusing.
Comment 3 Morten Welinder 2005-12-02 17:54:19 UTC
Fixed in goffice cvs.

Just don't put files into directories named "http:" or "ftp:".  In that
case, you get what you deserve.