mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 18:51:10 +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
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user