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

File modification date/time changes without modifying file #1494

Closed
ljb279 opened this issue Nov 12, 2021 · 7 comments · Fixed by #1489
Closed

File modification date/time changes without modifying file #1494

ljb279 opened this issue Nov 12, 2021 · 7 comments · Fixed by #1489

Comments

@ljb279
Copy link

ljb279 commented Nov 12, 2021

General information

  • App version: v2.8.3
  • Android version: 10

Description

Opening any file, then closing it without changes, results in the modification date/time of that file being changed to the current date/time.

Starting Markor changes the modification date/time on my Todo and QuickNote files, without even opening those files.

Markor should not change the modification date/time of a file unless it was modified, so we can tell when a file was actually changed.

I think this started in v2.8.2 and continues in v2.8.3.

@harshad1
Copy link
Collaborator

This has generally been the behavior always. We always load the file on open and save the file when the file is hidden

I recently tried adding logic to prevent saves using the mod time, but this led to issues as the android file mod time is kinda unreliable.

I will continue to try and fix this as it affects me too. But no guarantee.

@ljb279
Copy link
Author

ljb279 commented Nov 12, 2021

I reverted to markor-2.8.1(125) to test this again. For me, opening Markor-2.8.1 does not change the modification date/time of my Todo or Quicknotes, nor does opening a file and quiting without changing, even if I switch to edit mode from view mode. So I still think this started at 2.8.2.

I assumed this was related to fixes made for issues I saw here and in discussions related to caching, and I figured this would be hard to fix while not breaking elsewhere. But I do appreciate keeping the issue open.

@mbomb007
Copy link

mbomb007 commented Nov 12, 2021

I agree that this is a very recent thing, as I frequently view files without changing them, and they weren't marked as modified before.

Couldn't you at least check if the edit button has been pressed, and only save it if so? View are Edit are distinct actions, so that shouldn't be too hard.

@pudah
Copy link

pudah commented Nov 24, 2021

I am having the same issue. Version 2.8.3 on Android 11 updates files that are simply opened in view mode.

@pudah
Copy link

pudah commented Nov 24, 2021

And just opening the program updates the time stamp on the todo.txt and Quick Notes files.

@harshad1
Copy link
Collaborator

This should have been solved with the merging of #1489. You can get a debug apk from https://github.com/gsantner/markor/actions/runs/1484343141 (it will install alongside markor as 'mordor') to test if things are working correctly.

@gsantner
Copy link
Owner

And just opening the program updates the time stamp on the todo.txt and Quick Notes files.

Please use a thumbs up reaction on the issue topic. We know it sets file timestamp on every file at this specific version.


Btw, there was one person who suggested to always write regardless if content changed or not - when you read this...as you can see theres lots of people offended by this.

@gsantner gsantner linked a pull request Nov 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants