積丹尼 Dan Jacobson <[email protected]> writes: Hi Dan,
> When tramp is copying (from android (termux ssh)) and the file date is > (perhaps) not available, then maybe instead of using 0 (1970) as the date, > $ ls -l destination > -rw-rw---- 1 jidanni jidanni 2310202 1970-01-01 > P_20191224_094934_vHDR_On.jpg > -rw-rw---- 1 jidanni jidanni 2079894 1970-01-01 > P_20191227_101154_vHDR_On.jpg > -rw-rw---- 1 jidanni jidanni 1685860 1970-01-01 > P_20191227_102145_vHDR_On.jpg > -rw-rw---- 1 jidanni jidanni 1095279 1970-01-01 > P_20191227_102618_vHDR_On.jpg > -rw-rw---- 1 jidanni jidanni 791235 1970-01-01 > P_20191227_114225_vHDR_On.jpg > just use now, like plain cp(1) would. Tramp is stupid. It does exactly what it is said to do :-) Likely, the files have been copied via (copy-file source target ... keep-time ...), with a non-nil keep-time argument. Tramp tries to copy keeping the time then. For any file for which it cannot determine the last modified time, Tramp uses the constant tramp-time-dont-know, which is (0 0 0 1000). This is what you see as 1970-01-01 in the ls output. This is not only for the adb method; all different Tramp implementation of copy-time behave similar. If you want to see the current time as time stamp of the copy target, copy-file must be called with a nil keep-time argument. Best regards, Michael.
