removed unused property from temp nodes

Massimo Melina committed Jan 14, 2023 at 20:30 UTC 3cdd0feaddfd2ddc48b21e26169577020726dd42
1 file changed +1 -6
src/vfs.ts
+1 -6
@@ -39,7 +39,6 @@ export interface VfsNode extends Partial<VfsPerm> {
39 masks?: Masks // express fields for descendants that are not in the tree
40 // fields that are only filled at run-time
41 isTemp?: true // this node doesn't belong to the tree and was created by necessity
42 - url?: string // what url brought to this node
42 original?: VfsNode // if this is a temp node but reflecting an existing node
43 }
44
@@ -88,7 +87,6 @@ export async function urlToNode(url: string, ctx?: Koa.Context, parent: VfsNode=
87 ...child,
88 original: child,
89 isTemp: true,
91 - url: enforceFinal('/', parent.url || '') + name,
90 }
91 inheritFromParent(parent, ret)
92 inheritMasks(ret, parent, name)
@@ -182,10 +180,7 @@ export async function* walkNode(parent:VfsNode, ctx?: Koa.Context, depth:number=
180 const name = getNodeName(item)
181 // we basename for depth>0 where we already have the rest of the path in the parent's url, and would be duplicated
182 const virtualBasename = basename(name)
185 - Object.assign(item, {
186 - isTemp: true,
187 - url: enforceFinal('/', parent.url || '') + virtualBasename,
188 - })
183 + item.isTemp = true
184 inheritFromParent(parent, item)
185 applyMasks(item, parent, virtualBasename)
186 if (ctx && !hasPermission(item, 'can_see', ctx))