mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
improve create method of blob store
This commit is contained in:
@@ -114,7 +114,11 @@ public class FileBlobStore extends FileBasedStore<Blob> implements BlobStore
|
|||||||
|
|
||||||
try
|
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));
|
throw new StoreException("could not create blob for id ".concat(id));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user