Cyberduck Mountain Duck CLI

#6410 closed defect (fixed)

Exception thrown on negative timestamp - "Transfer Incomplete"

Reported by: Yaoyao Owned by: dkocher
Priority: normal Milestone: 4.2.1
Component: core Version: 4.2
Severity: normal Keywords:
Cc: Architecture:



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@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 ch.cyberduck.core.Local.writeTimestamp( 
at ch.cyberduck.core.DownloadTransfer$DownloadTransferFilter.complete( 
at ch.cyberduck.core.Transfer.transfer( 
at ch.cyberduck.core.Transfer.transfer( 
at ch.cyberduck.core.Transfer.transfer( 
at ch.cyberduck.core.Transfer.start( 
at cli.Ch.Cyberduck.Ui.Controller.TransferController$ Source) 
at ch.cyberduck.ui.AbstractController$ 
at java.util.concurrent.FutureTask$Sync.innerRun( 
at java.util.concurrent.ThreadPoolExecutor.runWorker( 
at java.util.concurrent.ThreadPoolExecutor$ 
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

Change History (2)

comment:1 Changed on Nov 30, 2011 at 11:42:43 PM by dkocher

  • Owner set to dkocher
  • Status changed from new to assigned

Thanks for the bug report. As a workaround, disable Preferences → Transfers → Timestamps → Downloads → Preserve modification date.

comment:2 Changed on Dec 1, 2011 at 10:36:24 AM by dkocher

  • Milestone set to 4.2.1
  • Resolution set to fixed
  • Status changed from assigned to closed

In r9328.

Note: See TracTickets for help on using tickets.