Enhancement: preserve modify date when copying files
I would consider this to be the expected behavior for most people, but I don't know which other attributes should be preserved as well.
@MrTipson in unix systems it is default that the timestamp is altered when copying there is a flag --preserve that preserves the owner, timestamp and mode. I could see the point for adding this option in the configuration though.
@lazysegtree what do you think?
I dont think we need to modify default behaviour.
➜ ~/temp/testf [9:20:29] stat -f "access=%Sa, modify=%Sm, changed=%Sc, Birth=%SB" file1.txt
access=Mar 15 08:25:22 2025, modify=Jan 22 20:11:34 2025, changed=Feb 14 21:04:28 2025, Birth=Jan 22 20:11:34 2025
➜ ~/temp/testf [9:20:33] cp file1.txt file1_copy.txt
➜ ~/temp/testf [9:20:40] stat -f "access=%Sa, modify=%Sm, changed=%Sc, Birth=%SB" file1_copy.txt
access=Apr 27 09:20:42 2025, modify=Apr 27 09:20:40 2025, changed=Apr 27 09:20:40 2025, Birth=Apr 27 09:20:40 2025
➜ ~/temp/testf [9:20:46]
A copied file is a completely new file. Birthed at the time of copy.
"I would consider this to be the expected behavior for most people" - So that is most likely not true.
Its true that I cannot speak for all people, so I decided to check out what other file managers do by default. Finder (MacOS) and File Manager (Windows 10) both preserve the date, alongside almost all of the 12 linux file managers I tried out. The notable mentions are ytree (doesn't preserve) and midnight commander (reserves by default, changeable in the dialog you get).
Based on this I think its fair to say that most people who have experience with other graphical file managers would expect that file modify date is preserved, especially when copying things like photos, where the timestamp could be just as important as the photo itself.
Ultimately, I think that someone accidentally wiping their metadata is a much worse outcome.