From 7e3c71139561177b15a08dac2f46969c414b52c4 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 11 May 2011 06:29:58 -0700 Subject: [PATCH] localdisk: Create queue should create directory too --- lib/go/camli/blobserver/localdisk/localdisk.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/go/camli/blobserver/localdisk/localdisk.go b/lib/go/camli/blobserver/localdisk/localdisk.go index ab22541eb..a1227140f 100644 --- a/lib/go/camli/blobserver/localdisk/localdisk.go +++ b/lib/go/camli/blobserver/localdisk/localdisk.go @@ -90,8 +90,13 @@ func (ds *DiskStorage) CreateQueue(name string) (blobserver.Storage, os.Error) { q := &DiskStorage{ SimpleBlobHubPartitionMap: &blobserver.SimpleBlobHubPartitionMap{}, root: ds.root, - partition: name, + partition: "queue-" + name, } + baseDir := ds.PartitionRoot(q.partition) + if err := os.MkdirAll(baseDir, 0700); err != nil { + return nil, fmt.Errorf("failed to create queue base dir: %v", err) + } + ds.mirrorPartitions = append(ds.mirrorPartitions, q) return q, nil }