Skip to content

Commit bfdc0dc

Browse files
committed
ensure files have names
1 parent bc2e8a7 commit bfdc0dc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/parser/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class FileParser {
6262
/**
6363
* Parse a Blob or File (handles binary detection and decompression)
6464
*/
65-
async parseFile(blob: Blob, fileName?: string): Promise<Result> {
65+
async parseFile(blob: Blob, fileName: string): Promise<Result> {
6666
// Read first 2 bytes to detect gzip magic bytes
6767
const chunk = await blob.slice(0, 2).arrayBuffer();
6868
const bytes = new Uint8Array(chunk);

src/ui/StackTraceApp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ export class StackgazerApp {
870870
if (text && text.trim()) {
871871
// Create a File object from the text content
872872
const blob = new Blob([text], { type: 'text/plain' });
873-
const file = new File([blob], 'clipboard-paste.txt', { type: 'text/plain' });
873+
const file = new File([blob], 'paste', { type: 'text/plain' });
874874
await this.handleFiles([file]);
875875
}
876876
}
@@ -904,7 +904,7 @@ export class StackgazerApp {
904904
// Handle regular file - parser handles binary detection
905905
console.time(`📄 File Import: ${file.name}`);
906906

907-
const result = await this.parser.parseFile(file);
907+
const result = await this.parser.parseFile(file, file.name);
908908

909909
if (result.success) {
910910
this.profileCollection.addFile(result.data);
@@ -2716,7 +2716,7 @@ export class StackgazerApp {
27162716

27172717
// Create File object to use consistent parsing API
27182718
const file = new File([arrayBuffer], fileName);
2719-
const result = await this.parser.parseFile(file);
2719+
const result = await this.parser.parseFile(file, fileName);
27202720

27212721
if (result.success) {
27222722
this.profileCollection.addFile(result.data);

0 commit comments

Comments
 (0)