Store absolute path for directly set repository locations

This commit is contained in:
René Pfeuffer
2019-06-05 10:45:41 +02:00
parent 9a1d80327e
commit a5c65b4e2c

View File

@@ -78,7 +78,7 @@ public class PathBasedRepositoryLocationResolver extends BasicRepositoryLocation
@Override @Override
public void setLocation(String repositoryId, T location) { public void setLocation(String repositoryId, T location) {
PathBasedRepositoryLocationResolver.this.setLocation(repositoryId, (Path) location); PathBasedRepositoryLocationResolver.this.setLocation(repositoryId, ((Path) location).toAbsolutePath());
} }
}; };
} }
@@ -148,7 +148,7 @@ public class PathBasedRepositoryLocationResolver extends BasicRepositoryLocation
.resolve(STORE_NAME.concat(StoreConstants.FILE_EXTENSION)); .resolve(STORE_NAME.concat(StoreConstants.FILE_EXTENSION));
} }
public void setLocation(String repositoryId, Path repositoryBasePath) { private void setLocation(String repositoryId, Path repositoryBasePath) {
pathById.put(repositoryId, repositoryBasePath); pathById.put(repositoryId, repositoryBasePath);
writePathDatabase(); writePathDatabase();
} }