Skip to content

fix: handle EBUSY in fsBridge readFile/readFileBuffer #1753

@kaizhou-lab

Description

@kaizhou-lab

Problem

Sentry issue ELECTRON-D1 — 283 occurrences.

fsBridge.ts readFile provider throws unhandled EBUSY: resource busy or locked when a file is locked by another process (common on Windows with open .pptx, .docx files).

The catch block only handles ENOENT, so EBUSY is re-thrown as an unhandled promise rejection.

Fix

Return null for EBUSY errors in both readFile and readFileBuffer providers, consistent with the existing ENOENT handling for inaccessible files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions