Safari aggiunge automaticamente l'estensione .txt ai file .ino

4

Quando scarico un file .ino in OS X, i miei file vengono automaticamente convertiti in .ino.txt e aperti dall'app TextEdit, anche se ho installato Arduino IDE. Come posso chiudere questa funzione?

    
posta Ekin 10.02.2016 - 17:15
fonte

1 risposta

3

Sembra che questo sia un problema del server. E non è possibile risolvere il problema modificando le impostazioni di Safari. Le risposte alla stessa domanda che ho trovato sono nel seguito.

L'utente di iMeowbot in macrumors dice che:

"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."

link

L'utente TETENAL in macnn dice che:

"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."

link

    
risposta data 23.05.2016 - 18:28
fonte

Leggi altre domande sui tag