Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#250 closed bug (fixed)

[StyledEdit] can't open files

Reported by: diver Owned by: bonefish
Priority: normal Milestone: R1
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

You can's open *some* text files in StyledEdit with double click. For example you can't open any file in /boot/beos/system/boot tested with hrev16575 under vmware.

Change History (17)

comment:1 by marcusoverhagen, 19 years ago

Status: newclosed

comment:2 by marcusoverhagen, 19 years ago

Resolution: invalid

comment:3 by marcusoverhagen, 19 years ago

Files that are executeable, like the boot scripts, can't be opened by double click (they will be executed instead).

Please reopen this bug if you have non-executeable files that can't be opened.

comment:4 by diver, 19 years ago

Status: closedreopened

comment:5 by diver, 19 years ago

.bash_history

comment:6 by diver, 19 years ago

Resolution: invalid

comment:7 by korli, 19 years ago

This seems fixed, at least for the few files I tested (.bash_history ...). Could you check if it still happens ?

comment:8 by diver, 19 years ago

I still can't open .bash_history in rev16998, but it could be a linux image build problems with mime types. Will check it on real hardware.

comment:9 by johndrinkwater, 19 years ago

I can verify this works for a BeOS built image; hrev17356

Diver: can you test and see if this was fixed with the recent linux mime changes? ( hrev17364 )

comment:10 by diver, 19 years ago

Ok, will do.

comment:11 by diver, 19 years ago

I tested it with hrev17364 under vmware with linux build image and it's still there. I think for this could be two reasons: *1. Philipp from http://www.schmidp.com/public/haiku/images/ didn't clean his objects dirs as noted by Ingo in hrev17364 commit. *2. Terminal (or bash) doesn't write text attribute to .bash_history. Don't know if it should do it though, but anyway, Haiku's registar should identify it as text file and load up StyledEdit.

Also note that this happens with newly created .bash_history file only.

comment:12 by bonefish, 19 years ago

Cc: axeld@… added

comment:13 by bonefish, 19 years ago

I verified the problem under Linux qemu. I haven't tested a BeOS built image or "real" installation yet, but I would expect them to behave just the same. The core of the problem is, that there is no sniffer rule set for text/plain, so, if the text file isn't a special kind of text file for which a MIME type with sniffer rule exists, or has a listed file name extension (.txt) it won't be recognized as text/plain.Since BeOS doesn't have a sniffer rule for text/plain either, my suspicion is that the recognition of text/plain files is hardcoded into the registrar. I actually don't find this particularly nice and would rather introduce a sniffer add-on interface, which would allow for more complex recognition algorithms.

comment:14 by axeld, 19 years ago

While I wouldn't mind such an interface, I think it would be fine to hard code text recognition support into the MIME type stuff, and use it in the text MIME type. I would find it rather annoying to have to load an add-on for such a basic thing :)

comment:15 by bonefish, 19 years ago

Fixed in revision 17784.

comment:16 by bonefish, 19 years ago

Status: reopenedclosed

comment:17 by bonefish, 19 years ago

Resolution: fixed
Note: See TracTickets for help on using tickets.