[Consolidation]: Handling of Invalid filenames created outside Obsidian

Merging several bugs related to invalid filenames imported to Obsidian.

1 Like

This bug report is mostly actually a compliment!

Short version: \ character at the beginning of a *.md filename (dragged into my Obsidian vault folder) resulted in a ‘blank’ vault. I could load other vaults in the Obsidian session, but trying to get into this one resulted in an apparent total lack of files. Dragging that file back out yielded a completely functional vault again.

Restrictions on filenaming seem totally understandable, but the lack of warning message was confusing/scary. I spent some time removing large files before noticing the bad filename was the problem.

Long version: I extracted and batch-converted ~1-2K worth of notes from Evernote. This resulted in some deeply unwise filenames. I decided to just dump everything in and sort it out later. After some experimentation, the file with the following name broke everything:

_Participants_(sometimes)_exploit_dependencies_hidden_in_Latin_Square_designs.md

Here are some filenames that DID NOT break Obsidian, congratulations!

!!!Can_we_surface_metadata_but_not_stimuli…md
(M-5-38_vs-4-47;_t(100)-2-43,_p-0…md
•-ScOrE_2019!!!.md
c@us3c@[email protected]

1 Like

@mekline Is the character \ ?

What OS are you on?

Cannot refer to files with pipe | in filename:

  1. Create in other editor file named “word1 | word2.md”
  2. Obsidian search see this file but when putting reference in the text it will interpret [[word1 | word2]] as if word2 is an alias to word1
  3. file word1.md will be created instead of the reference to “word1 | word2.md”

Solution

  1. allowing for special escape character for pipe | when referencing file with that name (and auto-inputing it when obsidian reference such file)

or

  1. Prompting user to change the name of that file

Steps to reproduce

Expected result

Actual result

Environment

  • Operating system:
  • Obsidian version:

Obsidian 0.7.4

Additional information

Yeah, we should prompt the user to change invalid filenames.

2 Likes

Steps to reproduce

Import any .MD note with existing symbols such as “*^-_” and others in it.

Try to rename the file or move the file and parent folder to another folder.

Expected result

Possible to move folder or file to another folder or location

Possible to rename the attachment file

Actual result

When renaming => error (see the video below)
When trying to move the attachment, nothing happens.

Environment

  • Operating system: MacOS Catalina 10.15.5
  • Obsidian version: 0.6.7.
  • Using custom CSS: “Red Graphite” by SeanWcom

Additional information

image

Interesting, can you please check if you still have this issue with 0.7. We will release it soon.

Yep, still persisting. I believe the reason is because I imported the notes already with special charachters, which are not allowed or at least I assume its the case.

I think the only character that is creating problems is the *. Can you try renaming it outside obsidian and see if the file than works in obsidian?

1 Like

Yep, I tested it, but it broke all the links to the note so it stopped visualising them in the preview mode. (when I rename the files outside of Obsi)

MacOS Catalina 10.15.5

And yes, it’s the \ character as far as I can tell.

# should be added to invalid filaname characters. See: https://forum.obsidian.md/t/poor-handling-of-character-in-the-filename/3192/1

Trying to open a Vault that contains a file with an invalid name (wrong encoding) prevents the vault from loading at all.

Steps to reproduce

I can’t really say how the file with invalid encoding was created since it was sent to me by somebody else (university stuff, nothing harmful) within a zip archive. After extracting the archive, Thunar (File explorer in xfce) displays the directory name like this (the ‘invalid encoding’ is added by thunar automatically):

ls in terminal says that the broken character is ‘$’\374’’. It should be the German Umlaut ü.

Trying to open the vault that contains the directory causes Obsidian to load indefinitely:

Expected result

Obsidian should load the vault, notify about the broken file(s) and exclude them.

Actual result

As above, the vault cant be loaded until the file is removed from the vault. The windows doesn’t respond and needs to be terminated using SIGTERM.

Environment

  • Operating system: Arch Linux
  • Obsidian version: 0.9.17 AppImage

Additional information

This archive contains the empty directory with the invalid encoding.
test.zip (162 Bytes)

The file with brackets in file name seems to conflict with the link mark[[]].
I tried to link a file like that, the link successfully created(can be seen as backlink), but only part of the file name was recognised and clickable.
image

I’m trying to add this snippet to a weekly template.

![[{{sunday:gggg-MM-DD}}]]
![[{{monday:gggg-MM-DD}}]]
![[{{tuesday:gggg-MM-DD}}]]
![[{{wednesday:gggg-MM-DD}}]]
![[{{thursday:gggg-MM-DD}}]]
![[{{friday:gggg-MM-DD}}]]
![[{{saturday:gggg-MM-DD}}]]

I can’t seem to figure out why this snippet is giving me this error.

Screen Shot 2021-02-17 at 9.56.01 PM
Screen Shot 2021-02-17 at 9.52.16 PM

1 Like

I think we closed most of these bugs. I will archive this thread. If you have specific issues open a new one.