Skip to content

Nota is unable to display and open some text files unless they are dragged into the editor #229

Description

@UriHerrera

Issue Description

Describe the bug

Some text files (.lua, for example) don't open unless I drag them into the editor, and even when they do open, navigating to them in the file picker doesn't display them.

Steps to reproduce the bug

  1. Open Nota
  2. Navigate to a directory with affected text files
  3. Not all files are visible
  4. Use another app, like Index, and double-click the file
  5. Nota does not open it

Expected behavior

Nota opens the text file.

Screenshots

Image

Nota does not display the Hyprland config file, hyprland.lua.

Image

Even if the file does exist. Image for reference.

Additional context

Nota uses a hard filter in its D-Bus/argument open path: only files that pass FMStatic::checkFileType(TEXT, mime) are accepted. In other words, Nota uses strict TEXT filtering in the file dialog/sidebar and also filters startup/IPC file opens using a MIME whitelist, which may not work as a real wildcard depending on the matcher.

Despite this, Nota (or rather, TE.CodeEditor) can open the file normally.

Image

hyprland.lua displays correctly in Nota

OS version and Desktop information

Open Station and run inxi -S to provide this information.

Nitrux 6.1.0
Nota 4.0.3 master/7efe638

Metadata

Metadata

Assignees

Labels

bug-priority-2Low priority bug. Minor issue; a few users affected; easy workarounds.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions