Skip to content

Commit 3ad0e94

Browse files
committed
Generate smaller inode IDs
1 parent 159c2ef commit 3ad0e94

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/mixins/async.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export function Async<const T extends typeof FileSystem>(FS: T): Mixin<T, AsyncM
239239
// @ts-expect-error 2556
240240
this._sync?.[`${key}Sync` as const]?.(...args);
241241
} catch (e: any) {
242-
throw new ErrnoError(e.errno, 'Out of sync! (' + e.message + ')', args[0] as string, key);
242+
if (e.code != 'ENOENT') throw new ErrnoError(e.errno, 'Out of sync! (' + e.message + ')', args[0] as string, key);
243243
}
244244
return result;
245245
};

src/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,5 @@ export type Concrete<T extends ClassLike> = Pick<T, keyof T> & (new (...args: an
172172
* @internal
173173
*/
174174
export function randomBigInt(): bigint {
175-
try {
176-
return crypto.getRandomValues(new BigUint64Array(1))[0];
177-
} catch {
178-
// fallback
179-
return BigInt('0x' + randomHex(16 /* 4 bits per char */));
180-
}
175+
return BigInt('0x' + randomHex(8));
181176
}

0 commit comments

Comments
 (0)