[Linux] Drag-and-dropping attachments with illegal characters fails silently

Steps to reproduce

Have a file you want to embed with any of the illegal Obsidian filename characters which are legal on Linux (\, :, |, *, ", <, >, ?) (eg. Screenshot 1512.png) and try to drag-and-drop it onto an Obsidian note.

Expected result

I feel in no way authorized to decide this so I guess this requires some discussion. I don’t know what the expected result should be. It could either:

  • Display an error message like when trying to use those characters in a filename
  • Strip away/replace the special characters
  • Give the attachment a generic name (kinda like with pasted images)
  • Nothing at all (keep the current behavior)
  • Something else

Actual result

Drag-and-dropping fails silently.


  • Operating system: Arch Linux, Gnome
  • Obsidian version: 0.8.11

Additional information

This is merged to: https://forum.obsidian.md/t/consolidation-handling-of-invalid-filenames-created-outside-obsidian/3250

I believe this has nothing to do with OS.
You were able to “move” the file because first of all you were able to create the file (in Linux). This because Linux permits filename characters that Obsidian doesn’t allow.
Every OS where this is possible will generate this “error”.

Some discussion is indeed needed.
As you want to assure cross platform compatibility you will need to go for the characters that are “do-able” in all the OS-es you want to support.

Yeah, it no doubt is. What I was trying to say is that I’m not sure whether MacOS allows characters which Obsidian doesn’t, and therefore has the same failure mode for drag-and drop.

As for the set of characters it disallows, I too feel it is because it makes it so that filenames are cross-platform, as you said.

It’s not a severe bug by any means, but, if Obsidian’s decision is to disallow those characters, drag-and-drop should not silently fail on platforms where you may encounter them.

Agree. For the makers to decide

Agree even more :wink: - If an “error” occurs a message should be displayed telling you what you are doing wrong (what’s going wrong with the program/App)