Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Fixed bug in SqlFeatureStore if configuration is stored in subfolders #672

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ public FeatureStore build() {
ConnectionProvider conn = workspace.getResource( ConnectionProviderProvider.class,
config.getJDBCConnId().getValue() );
checkConnection( conn );
File file = metadata.getLocation().resolveToFile( metadata.getIdentifier().getId() + ".xml" );
String filename = metadata.getIdentifier().getId() + ".xml";
int pos;
if ( ( pos = filename.lastIndexOf( "/" ) ) > -1 ) {
// TRICKY if file is in a subfolder, this folder is part of the identifier AND the file-location:
filename = filename.substring( pos + 1 );
}
File file = metadata.getLocation().resolveToFile( filename );
SQLFeatureStore fs = null;
try {
// TODO rewrite needed to properly resolve files using resource location
Expand Down