(p: string)
| 6378 | const oldPrefix = `${folder}/${oldSubpath}/` |
| 6379 | const newPrefix = `${folder}/${newSubpath}/` |
| 6380 | const rewritePath = (p: string): string => |
| 6381 | p.startsWith(oldPrefix) ? newPrefix + p.slice(oldPrefix.length) : p |
| 6382 | |
| 6383 | const notes = get().notes.map((n) => |
| 6384 | n.path.startsWith(oldPrefix) ? { ...n, path: rewritePath(n.path) } : n |