0

A convenient way for me to get tracklogs off my phone onto my PC is to email them from gmail to my primary account, which is set up in Thunderbird. When I go to open the attachment, I get

You have chosen to open:
Myfile.gpx
which is: XML Document (xxx kB)
from Mailbox://
What should Thunderbird do with this file?
Open with [dropdown]
Save

If I select "Save", the file is saved correctly, but if I select "Open with" the file saved in %TMP% and sent to my chosen program is MyFile.gpx.xml (not a big deal if I'm opening it in a text editor, but problematic for software that expects .gpx). Presumably it gets that from the MIME type

It also sets the readonly flag, which is more annoying; further tests suggest that it does that for incoming .txt files as well.

This is on my win7 machine, running Thunderbird 52.9.1 (32-bit), I think the behaviour is different on my Linux box at home, or at least was until recently.

Is there a buried setting somewhere to save temporary files under their real names rather than appending the MIME type? Or to disable saving as readonly? The Tools|Options|Attachments|Incoming tab has XML Document (text/xml :.xml) Always ask and no entry for .gpx

  • The readonly flag is added by Windows by default for all files that are downloaded from the Internet, so Thunderbird is not to blame for this feature of Windows, which is motivated by security concerns as email attachments can contain viruses. This flag can be ignored by the application that opens the file. What is that application in your case? – harrymc Sep 27 '18 at 14:52
  • @harrymc fair enough, but it's surprising in that case that it's only set for "open" and not "save" in that case (that's the sort of thing that really bugs me with windows). This explains why that aspect at least is different on Linux. I mainly open with jEdit, which won't let me make any changes to the file when it's open readonly, so the first step has to be Save As. I do eventually want to save (as a .gpx), once I've combined files and removed junk but the combination of read-only and the broken filename more than doubles the number of clicks in what should be a simple task &adds typing – Chris H Sep 27 '18 at 15:13
1

For jEdit, you could create a macro that does this after opening all files :

if (view.getBuffer().isReadOnly())
{
view.getBuffer().setReadOnly(false);
buffer.reload(view);
}

(As I don't use jEdit, I can't implement or test my advice.)

  • Unfortunately it's still readonly after that, but a macro could be an intersting approach because I could automate enough of the process to make it more efficient than if Windows+Thunderbird did what they were told (e.g. save-as stripping the extra extension). I'm also a bit reluctant to spend a lot of effort on a workaround for Thunderbird's misbehaviour and a misguided windows approach – Chris H Sep 27 '18 at 15:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.