Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templater updates new file's last modified timestamp even if no templater code was run #1424

Open
zedtools opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zedtools
Copy link

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):

  1. I create a file on Device 1 at 10am.
  2. 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.

@zedtools zedtools added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant