Opened 13 years ago

Closed 13 years ago

Last modified 13 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:
Has a Patch: no 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 Changed 13 years ago by marcusoverhagen

Status: newclosed

comment:2 Changed 13 years ago by marcusoverhagen

Resolution: invalid

comment:3 Changed 13 years ago by marcusoverhagen

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 Changed 13 years ago by diver

Status: closedreopened

comment:5 Changed 13 years ago by diver

.bash_history

comment:6 Changed 13 years ago by diver

Resolution: invalid

comment:7 Changed 13 years ago by korli

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

comment:8 Changed 13 years ago by diver

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 Changed 13 years ago by johndrinkwater

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 Changed 13 years ago by diver

Ok, will do.

comment:11 Changed 13 years ago by diver

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 Changed 13 years ago by bonefish

Cc: axeld@… added

comment:13 Changed 13 years ago by bonefish

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 Changed 13 years ago by axeld

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 Changed 13 years ago by bonefish

Fixed in revision 17784.

comment:16 Changed 13 years ago by bonefish

Status: reopenedclosed

comment:17 Changed 13 years ago by bonefish

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