mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 19:05:45 +00:00
fix(providers): share selected-file error classification
This commit is contained in:
1 parent
8d8d85ba22
commit
a32d731ed7
10 files changed
+96
-38
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { isSelectedRegularFileError } from "../filesystem/RegularFile.js";
|
||||
import { Il2cppBinaryFormatFailure } from "./Il2cppBinaryFormat.js";
|
||||
import { Il2cppMetadataFormatFailure } from "./Il2cppMetadataFormat.js";
|
||||
import type { AnalysisPartialObservation } from "../domain/analysisErrorBase.js";
|
||||
@@ -138,11 +139,7 @@ const failureForPrimary = (
|
||||
return new AnalysisAccessDeniedError(OPERATION, path, cause.code, {
|
||||
cause,
|
||||
});
|
||||
if (
|
||||
["ENOENT", "ENOTDIR", "ELOOP", "ENAMETOOLONG"].includes(
|
||||
String(cause.code),
|
||||
)
|
||||
)
|
||||
if (isSelectedRegularFileError(cause))
|
||||
return new AnalysisInputError(OPERATION, { cause }, [
|
||||
{
|
||||
path: [field],
|
||||
|
||||
Reference in new issue
Block a user