Possible to create notes exceeding MAX_PATH

It seems that Obsidian does not prevent you from creating notes with an absolute path that exceed the OS maximum file path length. This poses issues when you try to work with the note in the system file explorer or commit them to github.

I first discovered this when using the Obsidian Web Clipper with a pretty long article name, but it also happens when just adding a note internally with a long name. However when the notes name gets much longer Obsidian will just revert it, so there seems to be some kind of length limit that Obsidian recognizes? Maybe the issue is that it does not consider the path of the vault?

Steps to reproduce

Without Web Clipper

  1. Create a vault under C:\Users\xxxxx\Documents\Obsidian\exampleVault
  2. Create a note with the name longgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
  3. Try to copy the file in the windows file explorer
  4. It will fail with the message “The source and destination filenames are the same”

With Web Clipper

  1. Make a template with this note name: {{title|safe_name}}
  2. Clip this page to Obsidian
  3. Go to the created file in the windows explorer and try renaming it, which will be impossible without trimming it first
  4. Optionally try to commit the file to a git repository and get the error “fatal: Unable to process path”

Did you follow the troubleshooting guide? Y

Expected result

I would expect Obsidian to show some pop-up or warning that a file exceeds the limit, or maybe in the case of the Web Clipper just automatically shortens it?

Actual result

The note gets created normally in Obsidian and everything will seem to work fine until you try to commit the files to git or you try to work with it in the system file explorer.

Environment

SYSTEM INFO:
Obsidian version: v1.7.7
Installer version: v1.5.3
Operating system: Windows 10 Pro 10.0.22631
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 5
Restricted mode: off
Plugins installed: 24
Plugins enabled: 15
1: Advanced URI v1.41.0
2: Calendar v1.5.10
3: Dataview v0.5.67
4: Linter v1.28.0
5: Media DB v0.7.0
6: MetaEdit v1.8.2
7: QuickAdd v1.11.5
8: Templater v2.9.1
9: Settings Search v1.3.10
10: ReadItLater v0.10.1
11: Meta Bind v1.2.5
12: Force note view mode v1.2.2
13: Spaced Repetition v1.13.2
14: Map View v5.0.3
15: Recent Files v1.7.4


Additional information

I already made an issue on the Web Clipper Github, but was redirected here