Templater updates new file's last modified timestamp even if no templater code was run
zedtools opened this issue · 0 comments
Plugin information (please complete the following information):
- OS: Windows 11 and macOS 14.5
- Templater version: 2.4.1
- Obsidian version: 1.6.7
- Templater settings: Trigger Templater on new file creation
Describe the bug
When a new file is added, Templater updates the file's last modified timestamp to the current time, even if the file had no templater code in it.
Expected behavior
The file's last modified timestamp is unchanged.
Additional context
There are two scenarios where this is causing problems for me.
First of all, if I have a backed up copy of a .md file, and I copy it into my vault, Templater seems to detect it as a new file and updates the last modified timestamp.
Secondly, I am using the Self-hosted LiveSync plugin, and have the following behaviour (times are given just for example purposes):
- I create a file on Device 1 at 10am.
- At 11am, I run Obsidian on Device 2, and the file is synced. Templater on Device 2 detects the file as a new file, and updates the last modified timestamp to 11am.
Disabling the option "Trigger Templater on new file creation" stops this behaviour, but Templater should not be updating the last modified timestamp if the file was not modified.