[Cyberduck-trac] [Cyberduck] #6410: Exception thrown on negative timestamp - "Transfer Incomplete"

Cyberduck trac at trac.cyberduck.ch
Wed Nov 30 20:43:06 CET 2011


#6410: Exception thrown on negative timestamp - "Transfer Incomplete"
-----------------------+-----------------
    Reporter:  Yaoyao  |      Owner:
        Type:  defect  |     Status:  new
    Priority:  normal  |  Milestone:
   Component:  core    |    Version:  4.2
    Severity:  normal  |   Keywords:
Architecture:          |   Platform:
-----------------------+-----------------
 Hi,

 I noticed that on downloading a folder (using FTP), Cyberduck shows
 "Transfer Incomplete" message.  After turning on verbose logging, I
 noticed the following stack trace:

 {{{
 2011-11-30 11:22:21,952 [background-5] INFO
 ch.cyberduck.core.DownloadTransfer - Updating timestamp of
 C:\Users\Username\Desktop\FTP\FTP to -57600000
 2011-11-30 11:22:21,952 [background-5] DEBUG ch.cyberduck.core.Transfer -
 fireTransferDidEnd:ch.cyberduck.core.DownloadTransfer at f1591a
 2011-11-30 11:22:21,952 [background-5] DEBUG
 ch.cyberduck.core.TransferCollection - numberOfRunningTransfers:0
 2011-11-30 11:22:21,952 [Thread-0] DEBUG
 ch.cyberduck.core.TransferCollection - numberOfRunningTransfers:0
 2011-11-30 11:22:21,952 [Thread-0] DEBUG
 ch.cyberduck.core.TransferCollection - numberOfQueuedTransfers:0
 2011-11-30 11:22:21,952 [background-5] DEBUG ch.cyberduck.core.Transfer -
 poll
 2011-11-30 11:22:21,952 [background-5] ERROR
 ch.cyberduck.ui.AbstractController - Exception running background
 task:Negative time
 java.lang.IllegalArgumentException: Negative time
 at java.io.File.setLastModified(File.java:1272)
 at ch.cyberduck.core.Local.writeTimestamp(Local.java:449)
 at
 ch.cyberduck.core.DownloadTransfer$DownloadTransferFilter.complete(DownloadTransfer.java:239)
 at ch.cyberduck.core.Transfer.transfer(Transfer.java:492)
 at ch.cyberduck.core.Transfer.transfer(Transfer.java:600)
 at ch.cyberduck.core.Transfer.transfer(Transfer.java:565)
 at ch.cyberduck.core.Transfer.start(Transfer.java:705)
 at
 cli.Ch.Cyberduck.Ui.Controller.TransferController$TransferBackgroundAction.run(Unknown
 Source)
 at
 ch.cyberduck.core.threading.AbstractBackgroundAction.call(AbstractBackgroundAction.java:94)
 at ch.cyberduck.ui.AbstractController$1.call(AbstractController.java:94)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:167)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:604)
 at java.lang.Thread.run(Thread.java:883)
 at cli.System.Threading.ThreadHelper.ThreadStart_Context(Unknown Source)
 at cli.System.Threading.ExecutionContext.runTryCode(Unknown Source)
 at
 cli.System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(Unknown
 Source)
 }}}

 Note how the timestamp was negative, which isn't valid.  On closer
 inspection, the particular FTP server returns a 0 timestamp on all
 folders.  I suspect that when Cyberduck tries to translate the 0 timestamp
 to local time, resulting in a negative timestamp.

 One fix would be to reset a negative timestamp to 1s since epoch.  Or,
 just set it to the current timestamp.

 Thanks,
 Yao

-- 
Ticket URL: <http://trac.cyberduck.ch/ticket/6410>
Cyberduck <http://cyberduck.ch>
Open source FTP, SFTP, WebDAV, Cloud Files, Google Docs & Amazon S3 Browser for Mac & Windows.


More information about the Cyberduck-trac mailing list