const struct cp_options *x)
{
struct stat from_sb;
- if (strip_files && x->preserve_timestamps && stat (from, &from_sb) != 0)
+ if (x->preserve_timestamps && stat (from, &from_sb) != 0)
{
error (0, errno, _("cannot stat %s"), quote (from));
return false;
strip (to);
if (! change_attributes (to))
return false;
- if (strip_files && x->preserve_timestamps)
+ if (x->preserve_timestamps && (strip_files || ! S_ISREG (from_sb.st_mode)))
return change_timestamps (&from_sb, to);
return true;
}