Skip to content

Commit

Permalink
fix: no such file or directory, mkdir 'C:\BuildAgent\****\tmp\C:' (#115)
Browse files Browse the repository at this point in the history
* fix: no such file or directory, mkdir 'C:\BuildAgent\****\tmp\C:'

* fix: use commonjs filenamify

Fixes #113
  • Loading branch information
bobbyg603 authored May 21, 2024
1 parent 2caa0aa commit 0290e5f
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 5 deletions.
78 changes: 78 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"archiver": "^5.3.1",
"command-line-args": "^5.2.0",
"command-line-usage": "^6.1.1",
"filenamify": "^4.3.0",
"firstline": "^2.0.2",
"glob": "^10.3.10",
"macho-uuid": "^1.3.1",
Expand Down
4 changes: 0 additions & 4 deletions src/dsym.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ export async function getDSymFileInfos(path: string): Promise<SymbolFileInfo[]>
return [];
}
}

function normalizeModuleName(moduleName: string): string {
return moduleName.split('.')[0];
}
4 changes: 3 additions & 1 deletion src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { BugSplatAuthenticationError, SymbolsApiClient, VersionsApiClient } from '@bugsplat/js-api-client';
import filenamify from 'filenamify';
import { ReadStream, createReadStream, existsSync, mkdirSync } from 'fs';
import { stat } from 'node:fs/promises';
import { basename, dirname, extname, join } from 'node:path';
import retryPromise from 'promise-retry';
import { WorkerPool, cpus } from 'workerpool';
import { SymbolFileInfo } from './info';
import { tmpDir } from './tmp';

const workerCount = cpus;

export function createWorkersFromSymbolFiles(workerPool: WorkerPool, symbolFiles: SymbolFileInfo[], clients: [SymbolsApiClient, VersionsApiClient]): Array<UploadWorker> {
Expand Down Expand Up @@ -54,7 +56,7 @@ export class UploadWorker {
let tmpFileName = '';

if (dbgId && !isZip) {
const tmpSubdir = join(tmpDir, dirname(fileName));
const tmpSubdir = join(tmpDir, filenamify(dirname(fileName)));
if (!existsSync(tmpSubdir)) {
mkdirSync(tmpSubdir, { recursive: true });
}
Expand Down

0 comments on commit 0290e5f

Please sign in to comment.