4 ms·
the linux way works tho
by nofriend 4mo ago
the linux way works tho
- NooneAtAll3 4mo agoit really doesn't hiding information from user is not good by any means
- netsharc 4mo agoBut relying on them to tell the OS what type a file is, or allowing them to change the extension, isn't good either. lena.jpg doesn't become lena.pdf by changing the last 3 letters of the filename..
- tardedmeme 4mo agoIt gets really complicated when you get into overlapping file types, like with ISOBMFF. An .mp4 can also, simultaneously, be a valid .3gp because those are profiles of ISOBMFF. On the other extreme, JPEG is secretly two different incompatible formats (JFIF and Exif), and a video file with a different codec in the same container, or even a different track layout, might as well be a different format.
- NooneAtAll3 4mo ago> allowing them to change the extension, isn't good either why not? power to the people. At worst it just breaks. At best you get filetype chamelions that are straight up cool, yet harmless
- nofriend 4mo agoAm I missing something? Hiding things from users is a property of the windows approach. Did you reply to the wrong person?
- NooneAtAll3 4mo agoGGP comment literally says that linux way is hiding file type in the binary information. If you consider that as more visible I have many questions windows at least gets an option to display file type
- nofriend 4mo agoSome file formats, eg png, require a particular file header in order to be considered valid. This is true regardless of your operating system, be it windows or linux. If that is hidden information, then it is hidden regardless of which operating system you're on. On windows, if I have a png named .doc, then there is absolutely no way to determine that it is a valid png and could be opened with my image viewer with standard tools. On linux it will recommend you open the file with an image viewer regardless of the file extension. That seems to me like significantly less hidden information.
- anal_reactor 4mo ago> On windows, if I have a png named .doc, then there is absolutely no way to determine that it is a valid png And that's a good thing. Imagine receiving a file called "very_funny_cat.png" and Linux realizing that while it's not a valid PNG image, it is a valid ELF executable.
- nofriend 4mo agoRight, linux should instead go by the normal extension for an elf, which is no extension... instead this problem is solved by prompting the user if they want to execute the program.
- NooneAtAll3 4mo ago> instead this problem is solved by prompting the user it is solved by informing user how the file will be used aka file type
- netsharc 4mo agoThe sane option would be to change the file explorer to have a column/field of "What type of file we've detected it is". We already do this for directories. Nowadays we just rely on naming convention that the last 3 letters of the name identifies correctly what the file format is.