Skip to content

[FIX] fileUtils: Correctly provide stat property on readFile result and properly handle exceptions from fs.stat #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Dec 2, 2024

The fileInfo object contains property 'stat', not 'stats'. I couldn't find any usage of the property on the readFile result though.

Also, do not assume every fs.stat exception is caused by a missing file.

NOTE: UI5 Tooling v4 relies on the current behavior in the sense that it does not always pass an ENOENT error code to the less-openui5 file system callback. Therefore this should be released as part of a new minor version of less-openui5 (implying a breaking change).

The fileInfo object contains property 'stat', not 'stats'. I couldn't
find any usage of the property on the readFile result though.
@RandomByte RandomByte requested a review from matz3 December 2, 2024 12:30
matz3
matz3 previously approved these changes Dec 2, 2024
@RandomByte RandomByte force-pushed the fix-readFile-stat branch 3 times, most recently from d382253 to 3c37f2a Compare December 2, 2024 13:32
@RandomByte RandomByte changed the title [FIX] fileUtils: Correctly provide stat property on readFile result [FIX] fileUtils: Correctly provide stat property on readFile result and properly handle exceptions from fs.stats Dec 2, 2024
@RandomByte RandomByte changed the title [FIX] fileUtils: Correctly provide stat property on readFile result and properly handle exceptions from fs.stats [FIX] fileUtils: Correctly provide stat property on readFile result and properly handle exceptions from fs.stat Dec 2, 2024
Do not assume every exception is caused by a missing file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants