MCPcopy Create free account
hub / github.com/andylow92/file-system-like-github / resolvePath

Function resolvePath

apps/api/src/storage/pathResolver.ts:62–67  ·  view source on GitHub ↗
(logicalPath: string)

Source from the content-addressed store, hash-verified

60 }
61 }
62
63 return path.posix.normalize(unixLikePath);
64 }
65
66 function ensureInsideRoot(absolutePath: string): void {
67 const relative = path.relative(rootPath, absolutePath);
68 if (relative.startsWith('..') || path.isAbsolute(relative)) {
69 throw new StoragePathError('Requested path is outside of storage root');
70 }

Callers

nothing calls this directly

Calls 3

normalizeLogicalPathFunction · 0.85
ensureInsideRootFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected