diff --git a/playground/ty/src/Playground.tsx b/playground/ty/src/Playground.tsx index e0e600c5ed..5ace4b9134 100644 --- a/playground/ty/src/Playground.tsx +++ b/playground/ty/src/Playground.tsx @@ -96,6 +96,11 @@ export default function Playground() { file: FileId, newName: string, ) => { + if (newName.startsWith("/")) { + setError("File names cannot start with '/'."); + return; + } + const handle = files.handles[file]; let newHandle: FileHandle | null = null; if (handle == null) {