Skip to content

Commit

Permalink
fix issue with windows path on cb export
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh-couchbase committed Nov 3, 2023
1 parent 2331b01 commit d4bdfde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tools/CBExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Constants } from "../util/constants";
import { getCurrentDateTime } from "../util/util";
import * as keytar from "keytar";
import * as vscode from 'vscode';
import * as path from 'path';

export class CBExport {
static async export(
Expand Down Expand Up @@ -47,10 +48,10 @@ export class CBExport {
const fileName = `${bucket}_cbexport_${getCurrentDateTime()}.json`;
let currentPath: string;

if (filePath.endsWith("/")) { //TODO: Verify for windows
currentPath = filePath + fileName;
if (filePath.endsWith(path.sep)) {
currentPath = path.join(filePath, fileName);
} else {
currentPath = `${filePath}/${fileName}`;
currentPath = path.join(filePath, fileName);
}

const includeData = scp.join(",");
Expand Down

0 comments on commit d4bdfde

Please sign in to comment.