davesteele / gnome-gmail

Integrate GMail into the Linux Desktop
https://davesteele.github.io/gnome-gmail/
GNU General Public License v2.0
50 stars 13 forks source link

Attachment cannot handle plus sign in filename #47

Open hackerb9 opened 7 years ago

hackerb9 commented 7 years ago

It turns the plus sign into a space. To replicate:

  1. Create a document in Open Office and save it as "foo+bar"
  2. File → Send → Email Document
  3. Immediately a notification pops up from Gnome Gmail that it could not find the file "foo bar"

I do not experience this bug when I rename the file "foo&bar".

davesteele commented 7 years ago

This is actually intentional. URL decoding maps pluses to spaces. Mailto URLs in the wild often count on the plus being interpreted as a space.

hackerb9 commented 7 years ago

So, is this a bug in Open Office then? They should be percent encoding plus signs in filenames?

davesteele commented 7 years ago

I believe so. More specifically, the script senddoc.sh.

Though gnome-gmail's handling of escapes could use a closer look.

hackerb9 commented 7 years ago

I will file a bug with Libre Office, it seems they do try to percent encode the filename, but the program /usr/lib/libreoffice/uri-encode doesn't transmogrify plus signs.

In the meantime, and perhaps to avoid future problems, would it be possible for GG to do a double check for an incorrectly URI encoded filename before popping up the "File not found" error?