Merging several bugs related to invalid filenames imported to Obsidian.
This bug report is mostly actually a compliment!
\ 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:
Here are some filenames that DID NOT break Obsidian, congratulations!
@mekline Is the character
What OS are you on?
Cannot refer to files with pipe | in filename:
- Create in other editor file named “word1 | word2.md”
- 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
- file word1.md will be created instead of the reference to “word1 | word2.md”
- allowing for special escape character for pipe | when referencing file with that name (and auto-inputing it when obsidian reference such file)
- Prompting user to change the name of that file
Steps to reproduce
- Operating system:
- Obsidian version:
Yeah, we should prompt the user to change invalid filenames.
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.
Possible to move folder or file to another folder or location
Possible to rename the attachment file
When renaming => error (see the video below)
When trying to move the attachment, nothing happens.
- Operating system: MacOS Catalina 10.15.5
- Obsidian version: 0.6.7.
- Using custom CSS: “Red Graphite” by SeanWcom
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?
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:
Obsidian should load the vault, notify about the broken file(s) and exclude them.
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.
- Operating system: Arch Linux
- Obsidian version: 0.9.17 AppImage
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.
I’m trying to add this snippet to a weekly template.
I can’t seem to figure out why this snippet is giving me this error.
I think we closed most of these bugs. I will archive this thread. If you have specific issues open a new one.