mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
throw a EntryAlreadyExistsStoreException if a blob with the given id already exists
This commit is contained in:
@@ -116,9 +116,10 @@ public class FileBlobStore extends FileBasedStore<Blob> implements BlobStore
|
||||
{
|
||||
if (file.exists())
|
||||
{
|
||||
throw new StoreException("blob allready exists");
|
||||
}
|
||||
else if ( !file.createNewFile() )
|
||||
throw new EntryAlreadyExistsStoreException(
|
||||
"blob with id ".concat(id).concat(" allready exists"));
|
||||
}
|
||||
else if (!file.createNewFile())
|
||||
{
|
||||
throw new StoreException("could not create blob for id ".concat(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user