await app.vault.adapter.rmdir(dirPath, false)
throws SystemError [ERR_FS_EISDIR]: Path is a directory: rm returned EISDIR (is a directory)
If you replace false
with true
it works fine.
The behavior is counter-intuitive.
It is expected that with false
only empty directory can be removed and if it is not empty to throw the error something like directory is not empty
SYSTEM INFO:
Obsidian version: v1.3.5
Installer version: v1.3.5
Operating system: Windows 10 Pro 10.0.22621