Compare commits

...
6 Commits
Author SHA1 Message Date
Nick Craig-Wood a75bc0703f Version 1.04 2014-07-21 21:32:37 +01:00
Nick Craig-Wood 80ecea82e8 google cloud storage: Fix crash on Update error - fixes #9 2014-07-21 21:25:46 +01:00
Nick Craig-Wood 54cd46372a Version 1.03 2014-07-20 11:28:50 +01:00
Nick Craig-Wood 282cba20a0 swift, s3, dropbox: fix metadata read on Update()
This was causing changed files to be marked as corrupted on upload
2014-07-20 11:23:05 +01:00
Nick Craig-Wood 2479ce2c8e dropbox: go1.1 compatibility 2014-07-19 15:48:40 +01:00
Nick Craig-Wood 9aa4b6bd9b Version 1.02 2014-07-19 13:24:48 +01:00
10 changed files with 73 additions and 30 deletions

No files matched your search

+9 -5
View File
@@ -2,9 +2,13 @@ TAG := $(shell git describe --tags)
LAST_TAG := $(shell git describe --tags --abbrev=0)
NEW_TAG := $(shell echo $(LAST_TAG) | perl -lpe 's/v//; $$_ += 0.01; $$_ = sprintf("v%.2f", $$_)')
rclone: *.go */*.go
rclone:
@go version
go build
go install -v ./...
test: rclone
go test ./...
rclonetest/test.sh
doc: rclone.1 README.html README.txt
@@ -19,7 +23,7 @@ README.txt: README.md
install: rclone
install -d ${DESTDIR}/usr/bin
install -t ${DESTDIR}/usr/bin rclone
install -t ${DESTDIR}/usr/bin ${GOPATH}/bin/rclone
clean:
go clean ./...
@@ -31,10 +35,10 @@ website:
cd docs && hugo
upload_website: website
./rclone -v sync docs/public memstore:www-rclone-org
rclone -v sync docs/public memstore:www-rclone-org
upload:
./rclone -v copy build/ memstore:downloads-rclone-org
rclone -v copy build/ memstore:downloads-rclone-org
cross: doc
./cross-compile $(TAG)
+12
View File
@@ -261,6 +261,18 @@ Bugs
Changelog
---------
* v1.04 - 2014-07-21
* google cloud storage: Fix crash on Update
* v1.03 - 2014-07-20
* swift, s3, dropbox: fix updated files being marked as corrupted
* Make compile with go 1.1 again
* v1.02 - 2014-07-19
* Implement Dropbox remote
* Implement Google Cloud Storage remote
* Verify Md5sums and Sizes after copies
* Remove times from "ls" command - lists sizes only
* Add add "lsl" - lists times and sizes
* Add "md5sum" command
* v1.01 - 2014-07-04
* drive: fix transfer of big files using up lots of memory
* v1.00 - 2014-07-03
+18 -18
View File
@@ -2,34 +2,34 @@
title: "Rclone downloads"
description: "Download rclone binaries for your OS."
type: page
date: "2014-07-04"
date: "2014-07-21"
---
Rclone Download v1.01
Rclone Download v1.04
=====================
* Windows
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-windows-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-windows-amd64.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-windows-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-windows-amd64.zip)
* OSX
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-osx-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-osx-amd64.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-osx-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-osx-amd64.zip)
* Linux
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-linux-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-linux-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.01-linux-arm.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-linux-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-linux-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.04-linux-arm.zip)
* FreeBSD
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-freebsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-freebsd-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.01-freebsd-arm.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-freebsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-freebsd-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.04-freebsd-arm.zip)
* NetBSD
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-netbsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-netbsd-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.01-netbsd-arm.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-netbsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-netbsd-amd64.zip)
* [ARM - 32 Bit](http://downloads.rclone.org/rclone-v1.04-netbsd-arm.zip)
* OpenBSD
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-openbsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.01-openbsd-amd64.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-openbsd-386.zip)
* [AMD64 - 64 Bit](http://downloads.rclone.org/rclone-v1.04-openbsd-amd64.zip)
* Plan 9
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.01-plan9-386.zip)
* [386 - 32 Bit](http://downloads.rclone.org/rclone-v1.04-plan9-386.zip)
Older downloads can be found [here](http://downloads.rclone.org/)
+5 -1
View File
@@ -573,7 +573,9 @@ func (o *FsObjectDropbox) remotePath() string {
func metadataKey(path string) string {
// NB File system is case insensitive
path = strings.ToLower(path)
return fmt.Sprintf("%x", md5.Sum([]byte(path)))
hash := md5.New()
hash.Write([]byte(path))
return fmt.Sprintf("%x", hash.Sum(nil))
}
// Returns the key for the metadata database
@@ -666,6 +668,7 @@ func (o *FsObjectDropbox) setModTimeAndMd5sum(modTime time.Time, md5sum string)
if err != nil {
return fmt.Errorf("Couldn't set md5sum record: %s", err)
}
o.md5sum = md5sum
}
if !modTime.IsZero() {
@@ -674,6 +677,7 @@ func (o *FsObjectDropbox) setModTimeAndMd5sum(modTime time.Time, md5sum string)
if err != nil {
return fmt.Errorf("Couldn't set mtime record: %s", err)
}
o.modTime = modTime
}
return nil
+1 -1
View File
@@ -1,3 +1,3 @@
package fs
const Version = "v1.01"
const Version = "v1.04"
+4 -1
View File
@@ -555,9 +555,12 @@ func (o *FsObjectStorage) Update(in io.Reader, modTime time.Time, size int64) er
Metadata: metadataFromModTime(modTime),
}
newObject, err := o.storage.svc.Objects.Insert(o.storage.bucket, &object).Media(in).Name(object.Name).PredefinedAcl(o.storage.objectAcl).Do()
if err != nil {
return err
}
// Set the metadata for the new object while we have it
o.setMetaData(newObject)
return err
return nil
}
// Remove an object
+6 -3
View File
@@ -1,3 +1,8 @@
Remove FIXME skipping directory
Change lsd command so it doesn't show -1
* Make sure all Fses show -1 for objects Zero for dates etc
Todo
* FIXME: More -dry-run checks for object transfer
* Might be quicker to check md5sums first? for swift <-> swift certainly, and maybe for small files
@@ -46,9 +51,7 @@ Bugs
* When doing copy it recurses the whole of the destination FS which isn't necessary
Making a release
* go install -v ./...
* go test ./...
* rclonetest/test.sh
* make test
* make tag
* edit README.md
* git commit fs/version.go README.md docs/content/downloads.md
+16 -1
View File
@@ -260,6 +260,21 @@ func TestSync(flocal, fremote fs.Fs) {
// ------------------------------------------------------------
log.Printf("Sync after changing a file's contents, modtime but not length")
WriteFile("potato", "SMALLER BUT SAME DATE", t2)
err = fs.Sync(fremote, flocal, true)
if err != nil {
log.Fatalf("Sync failed: %v", err)
}
items = []Item{
{Path: "empty space", Size: 0, ModTime: t2, Md5sum: "d41d8cd98f00b204e9800998ecf8427e"},
{Path: "potato", Size: 21, ModTime: t2, Md5sum: "e4cb6955d9106df6263c45fcfc10f163"},
}
CheckListing(flocal, items)
CheckListing(fremote, items)
// ------------------------------------------------------------
log.Printf("Sync after removing a file and adding a file --dry-run")
WriteFile("potato2", "------------------------------------------------------------", t1)
err = os.Remove(localName + "/potato")
@@ -275,7 +290,7 @@ func TestSync(flocal, fremote fs.Fs) {
before := []Item{
{Path: "empty space", Size: 0, ModTime: t2, Md5sum: "d41d8cd98f00b204e9800998ecf8427e"},
{Path: "potato", Size: 21, ModTime: t3, Md5sum: "100defcf18c42a1e0dc42a789b107cd2"},
{Path: "potato", Size: 21, ModTime: t2, Md5sum: "e4cb6955d9106df6263c45fcfc10f163"},
}
items = []Item{
{Path: "empty space", Size: 0, ModTime: t2, Md5sum: "d41d8cd98f00b204e9800998ecf8427e"},
+1
View File
@@ -518,6 +518,7 @@ func (o *FsObjectS3) Update(in io.Reader, modTime time.Time, size int64) error {
return err
}
// Read the metadata from the newly created object
o.meta = nil // wipe old metadata
err = o.readMetaData()
return err
}
+1
View File
@@ -413,6 +413,7 @@ func (o *FsObjectSwift) Update(in io.Reader, modTime time.Time, size int64) erro
return err
}
// Read the metadata from the newly created object
o.meta = nil // wipe old metadata
err = o.readMetaData()
return err
}