Skip to content

Conversation

@birdie-github
Copy link

Summary

When copying or moving directories with "Preserve all timestamps" enabled, timestamps are restored only for newly created destination directories.

If the destination directory already exists, its timestamps are currently left unchanged, even when it corresponds to a source directory being copied. This breaks the expected behavior of the option.

Queue existing destination directories for timestamp restoration in the same way as newly created ones, so their timestamps are restored after copy completion.

References

Fixes #460

When copying or moving directories with "Preserve all timestamps" enabled, timestamps are restored only for newly created destination directories.

If the destination directory already exists, its timestamps are currently left unchanged, even when it corresponds to a source directory being copied. This breaks the expected behavior of the option.

Queue existing destination directories for timestamp restoration in the same way as newly created ones, so their timestamps are restored after copy completion.

Fixes FarGroup#460
@sonarqubecloud
Copy link

@birdie-github
Copy link
Author

On the new Sonar Cloud's issue: the additional nesting already exists and this change adds no new structural complexity and keeps the behavior local and explicit.

@alabuzhev
Copy link
Contributor

Looks good.
Pls update changelog and vbuild.m4 too, squash and we can merge.

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.

Directories timestamps are not preserved on copy/move when they already exist

2 participants