Skip to content

Commit e60accc

Browse files
Merge pull request #271 from Canner/hotfix-bq
fix removing slash issue
2 parents dcf03d1 + 4e3da11 commit e60accc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/extension-driver-bq/src/lib/bqDataSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class BQDataSource extends DataSource<any, BQOptions> {
9292
const [job] = await bigQuery.createQueryJob(queryOptions);
9393
await this.runJobAndWait(job);
9494
const getFilesResponse = await storage.bucket(bucketName).getFiles({
95-
prefix: directory.slice(1), // remove the first slash
95+
prefix: directory[0] === '/' ? directory.slice(1) : directory, // remove the first slash if needed
9696
});
9797
await Promise.all(
9898
getFilesResponse[0].map(async (file) => {

0 commit comments

Comments
 (0)