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

CB-5737 global project path fix #2955

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
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 @@ -34,15 +34,15 @@ public class WebGlobalProject extends BaseProjectImpl {

private static final Log log = Log.getLog(WebGlobalProject.class);

private final String projectId;
private final String projectName;

public WebGlobalProject(
@NotNull DBPWorkspace workspace,
@Nullable SMSessionContext sessionContext,
@NotNull String projectId
@NotNull String projectName
) {
super(workspace, sessionContext);
this.projectId = projectId;
this.projectName = projectName;
}

@Override
Expand All @@ -53,13 +53,13 @@ public boolean isVirtual() {
@NotNull
@Override
public String getName() {
return projectId;
return projectName;
}

@NotNull
@Override
public Path getAbsolutePath() {
return getWorkspace().getAbsolutePath().resolve(projectId);
return getWorkspace().getAbsolutePath().resolve(projectName);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.jkiss.dbeaver.model.app.DBPProject;
import org.jkiss.dbeaver.model.impl.app.BaseProjectImpl;
import org.jkiss.dbeaver.model.impl.app.BaseWorkspaceImpl;
import org.jkiss.utils.CommonUtils;

import java.io.IOException;
import java.net.URI;
Expand Down Expand Up @@ -82,7 +83,8 @@ public void initializeProjects() {
globalProject = new WebGlobalProject(
this,
getAuthContext(),
WebAppUtils.getGlobalProjectId());
CommonUtils.notEmpty(WebAppUtils.getWebApplication().getDefaultProjectName())
);
activeProject = globalProject;
}

Expand Down