obsidian-folder-notes icon indicating copy to clipboard operation
obsidian-folder-notes copied to clipboard

Renaming folder note causes "Destination file already exists" error message to pop up, broken Templater tp.file.rename()

Open SirDotJ opened this issue 1 year ago • 1 comments

As title says every time I rename a folder note through the note itself with sync turned on message "Destination file already exists" pops up. But the note and folder are still renamed. Problem is that I think this causes Templater's rename function not to work properly: rename command still goes through and renames the file and folder, but all of the Templater commands get left over and act as if the whole thing failed with an error message.

Relative console output is provided:

Without Templater: Error message Console output

Using template file with tp.file.rename() in it: Used template Failed folder creation attempt Console output

SirDotJ avatar Feb 29 '24 02:02 SirDotJ

Also see https://github.com/LostPaul/obsidian-folder-notes/issues/177 which seems to be the variant when trying to rename the actual folder (but should be the same when both are in sync).

EDIT: actually the workaround in #177 is to edit the note file title itself and then it works so it doesn't seem to be the same bug...

hsandt avatar Mar 12 '25 14:03 hsandt