4

When I download an .ino file in OS X, my files are automatically converted to .ino.txt and opened by TextEdit app, even though, I have installed Arduino IDE. How can I close this feature?

6
  • 1
    Seems like a safari problem, where it renames any possibly harmful files to .txt. – Gerben Feb 10 '16 at 16:40
  • 1
    This is not an Arduino specific question, and should be migrated to SE Ask Different. – Greenonline Feb 10 '16 at 20:47
  • 1
    It's not happening to me. If I download gammon.com.au/Arduino/Temperature_Monitor.ino it appears as a .ino file. – Nick Gammon Feb 10 '16 at 20:53
  • I don't how to migrate a question. I agree with you this is not completely an Arduino question , however I thought Arduino users may be more familiar with this issue. – Ekin Feb 11 '16 at 10:30
  • 1
    Moderators migrate questions. You could provide more information, such as the place you got this .ino file from (link). – Nick Gammon Feb 11 '16 at 21:47
3

It seems that this is a server issue. And one can't solve the issue by changing safari settings. The answers to the same question I found are in the below.

iMeowbot user in macrumors says that:

"This filename modification stuff isn't something that Apple made up, it comes straight out of RFC 2183 (see "2.3 The Filename Parameter" and "5. Security Considerations"). While that RFC talks about "messages" and "mail" it applies equally to the Web, as HTTP employs MIME.

OS X and Safari have no way to read the mind of the server operator, and cannot tell if a mismatched media type and filename are accidental or intentional. So, they follow the standard.

Recent Safari versions add additional checks, such as that annoying prompt for when something appears to contain an executable file. It's all part of the same healthy paranoia that helps ensure that the end user knows exactly what a remote server is attempting to send."

http://forums.macrumors.com/threads/safari-adding-txt-to-a-m4v-download.167086/

TETENAL user in macnn says that:

"AFAIK the Apache server software comes with a preset of extension->MIME-type assignments. If a file with an unknown extension (like .dmg) is served with the MIME-type text as a fallback, Safari adds a .txt extension. This behavior is arguably correct. The server tells Safari it is serving a text-file, and a text file needs a .txt extension on Mac to be opened with a text editor. So Safari adds one. Other browsers ignore the server, which is a short term benefit for the user, but in the long run a) makes the server admin not notice the mistake and b) prevents the server admin to use this feature whenever he intentionally wants to (as opposed to unintentionally doesn't care as usually).

Anyway, to fix this you can create a file .htaccess to the respective folder and correctly define the missing MIME-types by adding AddType application/octet-stream .dmg or AddType application/x-stuffit .sit and AddType application/x-stuffit .sitx etc."

http://forums.macnn.com/82/applications/339922/safari-apending-txt-file-extensions-how/

2
  • 1
    Welcome to Ask Different! Please refrain from posting link-only answers. Links can change over time and then we'll lose the reference to the answers. See How to Answer for good info on how to correctly answer questions. - From Review - – fsb May 23 '16 at 19:20
  • Thank you for the comment, I quoted the related answers. – Ekin May 23 '16 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .