Open ffais opened 3 months ago
Hmm, I think copying the mtime is generally desirable, even if only cosmetic. I guess I wish there was a "try to preserve mtime but don't fail if you can't" flag. :disappointed:
A solution could be to introduce a flag like "unsupportedmtime=true|false" and add the touch argument based on that, instead of setting it by default.
Something like that:
if [ "$unsupportedmtime" != 'false' ]; then
targetTarArgs+=(
--touch
)
fi
I added the --touch flag as targetTarArgs to prevent the "Cannot utime: Operation not supported" error message from appearing, especially when some storage types (e.g. Azure FileShare) are used on Kubernetes.