Skip to content

Commit

Permalink
allow sessionFilesFolder to be relative to the workspace folder if th…
Browse files Browse the repository at this point in the history
…e path provided in the config is not absolute (#1336)

* allow sessionFilesFolder to be relative to the workspace folder if the path provided in the config is not absolute

* fixed brackets
  • Loading branch information
Namyts authored Jul 8, 2024
1 parent 61bdd19 commit 530c3ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/plugins/connection-manager/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ export class ConnectionManagerPlugin implements IExtensionPlugin {

if (Config.sessionFilesFolder && Config.sessionFilesFolder != '') {
baseFolder = Uri.file(Config.sessionFilesFolder);
if(!path.isAbsolute(Config.sessionFilesFolder) && workspace.workspaceFolders && workspace.workspaceFolders.length){
baseFolder = path.resolve(workspace.workspaceFolders[0].uri, Config.sessionFilesFolder)
}
}

const sessionFilePath = path.resolve(baseFolder.fsPath, getSessionBasename(conn.name));
Expand Down

0 comments on commit 530c3ad

Please sign in to comment.