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

update mtime with the mtime from the database #22

Closed
wants to merge 1 commit into from
Closed

update mtime with the mtime from the database #22

wants to merge 1 commit into from

Conversation

szaimen
Copy link

@szaimen szaimen commented Feb 1, 2022

Signed-off-by: szaimen [email protected]

@@ -112,7 +112,7 @@ function correct_mtime() {

if [ "$action" == "fix" ]
then
touch -c "$filepath"
touch -c "$filepath" -m -d "$(date --date @"$mtime_in_db")"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do that, then the mtime won't change as it is the same in the DB and on the FS. See:

if [ "$mtime_in_db" != "$mtime_on_fs" ]

Did you have a situation where this would make sense?

Copy link
Author

@szaimen szaimen Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I understand the motivation, but as the mtime is lost on both sides, db and fs, then this will not help.

Copy link
Collaborator

@artonge artonge Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only option is to restore the mtime from a backup. But it is out of the scope of this tool.

@artonge artonge closed this Feb 2, 2022
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 this pull request may close these issues.

2 participants