Copying files with really old dates will pop-up write error.

Support for Android version of Total Commander

Moderators: white, sheep, Hacker, Stefan2

Post Reply
humpty
Junior Member
Junior Member
Posts: 2
Joined: 2019-01-18, 17:03 UTC

Copying files with really old dates will pop-up write error.

Post by *humpty »

Admittedly, the file modified date/time was wrong to begin with, but I didn't expect a pop-up.

TC 3.22
TC-LAN Plugin 3.06
Pop-Up: Error writing to target file! /storage/emulated/0/Download/some.file!

(File was still copied ok.)

Modified Stamp: 1970-01-01 08:00:00 (on linux machine)
TC Date Time: 1/1/01 07:36 (on phone)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41267
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Copying files with really old dates will pop-up write error.

Post by *ghisler(Author) »

You get an exception when setLastModified causes an exception. According to Google documentation, this happens when the timestamp is a negative number. Zero timestamp would be 00:00:00 GMT, January 1, 1970. So 8:00 should not be negative, and not cause an exception. But due to time zone conversion it could become negative (1970-01-01 08:00:00 is local time, setLastModified uses GMT).
Author of Total Commander
http://www.ghisler.com
Post Reply