mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-01 22:15:17 +02:00
fix(install): verify legacy postimages with owned descriptors
Preserve contributor history and current-main behavior while resolving the exact reviewed follow-up.
Source-PR: https://github.com/affaan-m/ECC/pull/3008
Source-Parent: c492920468
Review-Manifest-SHA256: 4f71a8f8d4d3aedcfb03f41d37274c28c6b83b39250d2f466e7f8243325ae09a
This commit is contained in:
@@ -109,7 +109,8 @@ function inspectLegacyOpencodeState(location) {
|
||||
function hashFileNoFollow(filePath, fileSystem = fs) {
|
||||
// The filesystem seam supplies operations, never the read-only access policy.
|
||||
const flags = fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0);
|
||||
const descriptor = fileSystem.openSync(filePath, flags);
|
||||
// Read-only opens ignore mode; adapters still receive an owner-only default.
|
||||
const descriptor = fileSystem.openSync(filePath, flags, 0o600);
|
||||
try {
|
||||
const before = fileSystem.fstatSync(descriptor, { bigint: true });
|
||||
if (!before.isFile()) {
|
||||
|
||||
Reference in New Issue
Block a user