localdisk: Create queue should create directory too

This commit is contained in:
Brad Fitzpatrick 2011-05-11 06:29:58 -07:00
parent 68898203e5
commit 7e3c711395
1 changed files with 6 additions and 1 deletions

View File

@ -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
}