mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
Fix directory for file based stores
This commit is contained in:
@@ -58,8 +58,6 @@ public abstract class FileBasedStoreFactory {
|
|||||||
private RepositoryLocationResolver repositoryLocationResolver;
|
private RepositoryLocationResolver repositoryLocationResolver;
|
||||||
private Store store;
|
private Store store;
|
||||||
|
|
||||||
private File storeDirectory;
|
|
||||||
|
|
||||||
protected FileBasedStoreFactory(SCMContextProvider contextProvider , RepositoryLocationResolver repositoryLocationResolver, Store store) {
|
protected FileBasedStoreFactory(SCMContextProvider contextProvider , RepositoryLocationResolver repositoryLocationResolver, Store store) {
|
||||||
this.contextProvider = contextProvider;
|
this.contextProvider = contextProvider;
|
||||||
this.repositoryLocationResolver = repositoryLocationResolver;
|
this.repositoryLocationResolver = repositoryLocationResolver;
|
||||||
@@ -75,7 +73,7 @@ public abstract class FileBasedStoreFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected File getStoreLocation(String name, Class type, Repository repository) {
|
protected File getStoreLocation(String name, Class type, Repository repository) {
|
||||||
if (storeDirectory == null) {
|
File storeDirectory;
|
||||||
if (repository != null) {
|
if (repository != null) {
|
||||||
LOG.debug("create store with type: {}, name: {} and repository: {}", type, name, repository.getNamespaceAndName());
|
LOG.debug("create store with type: {}, name: {} and repository: {}", type, name, repository.getNamespaceAndName());
|
||||||
storeDirectory = this.getStoreDirectory(store, repository);
|
storeDirectory = this.getStoreDirectory(store, repository);
|
||||||
@@ -84,8 +82,7 @@ public abstract class FileBasedStoreFactory {
|
|||||||
storeDirectory = this.getStoreDirectory(store);
|
storeDirectory = this.getStoreDirectory(store);
|
||||||
}
|
}
|
||||||
IOUtil.mkdirs(storeDirectory);
|
IOUtil.mkdirs(storeDirectory);
|
||||||
}
|
return new File(storeDirectory, name);
|
||||||
return new File(this.storeDirectory, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user