From 00200b4c7521ab24a1ac7768e4b466fcae99f1a8 Mon Sep 17 00:00:00 2001 From: hyperion Date: Tue, 10 Nov 2026 12:02:21 +0100 Subject: [PATCH] - Fixed all of `path_resolver.ts` functions - `resolveInode` functions now `resolvePointer` - Fixed all resolve pointer -> path functions --- src/core/commands/pwd.ts | 4 +- src/core/util/path_resolver.ts | 71 +++++++++++++++++++++++----------- src/dev.ts | 12 +++--- 3 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/core/commands/pwd.ts b/src/core/commands/pwd.ts index c8d4c77..5f85e0b 100644 --- a/src/core/commands/pwd.ts +++ b/src/core/commands/pwd.ts @@ -4,7 +4,7 @@ import { createErrorResult, createSuccessResult, type ResultSuccess } from "@cor import { getCurrentSession } from "@core/session_manager"; import type { ShellState } from "@core/shell_state"; import type { InvalidArgumentsError, ShellError } from "@core/util/errors"; -import { resolveInode } from "@core/util/path_resolver"; +import { resolvePointer } from "@core/util/path_resolver"; export const COMMAND_NAME = "pwd"; @@ -23,7 +23,7 @@ async function main(io: CommandIO, state: ShellState, args: string[]): Promise = new Map(); const groups: Map = new Map(); @@ -56,7 +54,7 @@ const user: UserInfo = { uid: 1000, gid: 1000, // <- PRIMARY GID group: [1000], // <- GROUPS ARRAY - home: 14, + home: "0:14", }; const group: GroupInfo = { groupname: "kamil", @@ -69,6 +67,8 @@ groups.set(1000, group); const state: ShellState = createInitialShellState(fs, users, groups, user); Shell.init(state); +console.log(resolvePointer(state, "0:15")); + //console.log(resolveInode(Shell.Instance?.State!, 6)); //console.log(resolveInode(Shell.Instance?.State!, 6, true));