Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#76 Exit from keyboard leaves zero byte file

open
nobody
None
5
2013-02-19
2011-01-05
Anonymous
No

Exiting the program with control-c while downloading leaves a zero length file. Suggest that the default behaviour be to not leave partial files behind unless e.g. --partial is specified (similar to rsync).

Here's an example, using s3cmd 1.0.1-rc1 on OSX 10.6

mangtronix@SnowFort:~/Downloads/s3cmd-1.0.0-rc1
$ ./s3cmd sync s3://magicwindow.test mw.test
s3://magicwindow.test/Photo 2.jpg -> mw.test/Photo 2.jpg [1 of 50530]
[...]
1222 of 1222 100% in 0s 2.28 kB/s done
s3://magicwindow.test/logs/2010-04-13-06-20-22-0B85EED060988098 -> mw.test/logs/2010-04-13-06-20-22-0B85EED060988098 [25 of 50530]
^CWARNING: Exiting after keyboard interrupt

$ ls -l mw.test/logs/2010-04-13-06-20-22-0B85EED060988098
-rwxr-xr-x 1 mangtronix staff 0 Jan 4 21:54 mw.test/logs/2010-04-13-06-20-22-0B85EED060988098

Discussion