From 64587510646ac1b52e634522e785d1ddd968c1e7 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 1 Nov 2010 16:35:22 -0700 Subject: [PATCH] Update to Go release.2010-10-27 --- blobserver/go/enumerate.go | 10 +++++----- indexing/basic/index.pl | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blobserver/go/enumerate.go b/blobserver/go/enumerate.go index 844f98e99..9904b756f 100644 --- a/blobserver/go/enumerate.go +++ b/blobserver/go/enumerate.go @@ -14,7 +14,7 @@ const maxEnumerate = 100000 type blobInfo struct { *BlobRef *os.FileInfo - *os.Error + os.Error } func readBlobs(ch chan *blobInfo, blobPrefix, diskRoot, after string, remain *uint) { @@ -22,27 +22,27 @@ func readBlobs(ch chan *blobInfo, blobPrefix, diskRoot, after string, remain *ui dir, err := os.Open(dirFullPath, os.O_RDONLY, 0) if err != nil { fmt.Println("Error opening directory: ", err) - ch <- &blobInfo{Error: &err} + ch <- &blobInfo{Error: err} return } defer dir.Close() names, err := dir.Readdirnames(32768) if err != nil { fmt.Println("Error reading dirnames: ", err) - ch <- &blobInfo{Error: &err} + ch <- &blobInfo{Error: err} return } sort.SortStrings(names) for _, name := range names { if *remain == 0 { - ch <- &blobInfo{Error: &os.ENOSPC} + ch <- &blobInfo{Error: os.ENOSPC} return } fullPath := dirFullPath + "/" + name fi, err := os.Stat(fullPath) if err != nil { - bi := &blobInfo{Error: &err} + bi := &blobInfo{Error: err} ch <- bi return } diff --git a/indexing/basic/index.pl b/indexing/basic/index.pl index e13484739..630f34320 100755 --- a/indexing/basic/index.pl +++ b/indexing/basic/index.pl @@ -155,7 +155,7 @@ sub populate_blob_types { sub get_type_from_magic { my $magic = shift; - if ($magic =~ /^{.+"camliVersion"/s) { + if ($magic =~ /^{.*"camliVersion"/s) { return "application/json+camli"; } if ($magic =~ /^\xff\xd8\xff\xe1/) {