Open JoaoDelille opened 1 month ago
Can you determine which mime types are detected for these files?
Can you determine which mime types are detected for these files?
As it turns out, plaintext opens in the editor, while what is detected as Python opens in Firefox.
As before, file extension does not matter.
I should add that cosmic files does NOT match what the mime type reports:
I have an html file and it is opened by brave by default. It should open in firefox since that is my default browser. I suspect that the code simply picks the first entry in the "open with" menu when clicking the "open" button. The "open with" menu is sorted alphabetically. Uninstalling brave leads it to open calibre when clicking the file which also corresponds to the now first entry in the "open with" menu.
@19MisterX98 That sounds like a different issue from mine. The scripts im talking about don't even show firefox as an option: Maybe open a new issue for that bug
Kk
Edit: It somehow fixed itself and detects firefox as the default now
Cosmic-files version: Name : cosmic-files Version : 0.1.0~^20240829gitd923efa Release : 1.fc40 Architecture : x86_64 Size : 28 M Source : cosmic-files-0.1.0~^20240829gitd923efa-1.fc40.src.rpm Repository : @System From repo : copr:copr.fedorainfracloud.org:ryanabx:cosmic-epoch Summary : Libcosmic file manager
Issue/Bug description: Double clicking on a script will open it in the default browser. This does not depend on the file being marked as executable. This does not happen with regular text files. A file named "test.py" containing regular text opens in the text editor, however the same file will open in the default browser if it contains valid python code.
Steps to reproduce: Create two files, the extension does not matter. In one of them write regular text, in the other write valid python or shell code such as "from datetime import datetime" or "#!/bin/bash" When double clicked the regular text file will open in the default text editor, but the code opens in the browser.
Expected behavior: Both files open on the default text editor instead of the default browser
Other notes: I am on fedora 40 workstation. This is only partly reproducible with python scripts, a text file containing
from datetime import datetime
always opens in firefox, but a text file containingimport numpy as np
always opens in cosmic edit. Shell scripts always open in firefox presumably because they all begin with#!/bin/bash
Not sure about other languages because I have not tried them. Empty files also open in firefox