improve create method of blob store

This commit is contained in:
Sebastian Sdorra
2012-12-07 14:13:12 +01:00
parent 24e9b53115
commit 202d1741cd

View File

@@ -114,7 +114,11 @@ public class FileBlobStore extends FileBasedStore<Blob> implements BlobStore
try
{
if (!file.exists() &&!file.createNewFile())
if (file.exists())
{
throw new StoreException("blob allready exists");
}
else if ( !file.createNewFile() )
{
throw new StoreException("could not create blob for id ".concat(id));
}