[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When no date, use now, instead of 0 (1970)
From: |
Michael Albinus |
Subject: |
Re: When no date, use now, instead of 0 (1970) |
Date: |
Fri, 10 Jan 2020 18:13:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
積丹尼 Dan Jacobson <address@hidden> 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.
- When no date, use now, instead of 0 (1970), 積丹尼 Dan Jacobson, 2020/01/10
- Re: When no date, use now, instead of 0 (1970),
Michael Albinus <=
- Re: When no date, use now, instead of 0 (1970), 積丹尼 Dan Jacobson, 2020/01/10
- Re: When no date, use now, instead of 0 (1970), Michael Albinus, 2020/01/10
- Re: When no date, use now, instead of 0 (1970), 積丹尼 Dan Jacobson, 2020/01/10
- Re: When no date, use now, instead of 0 (1970), Michael Albinus, 2020/01/10