Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit afbc566

Browse files
fix error crash reprot file not exist (#710)
1 parent bbf7f1e commit afbc566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortex-js/src/infrastructure/services/file-manager/file-manager.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class FileManagerService {
114114
filePath: string,
115115
): Promise<{ data: any; position: number }> {
116116
try {
117-
const fileDescriptor = await openAsync(filePath, 'r');
117+
const fileDescriptor = await openAsync(filePath, 'a+');
118118
const stats = await promises.stat(filePath);
119119
const bufferSize = 1024 * 5; // 5KB
120120
const buffer = Buffer.alloc(bufferSize);

0 commit comments

Comments
 (0)