fix folder id bug
This commit is contained in:
parent
db8c26cd38
commit
ccc14f3c97
@ -243,7 +243,7 @@ io.on("connection", async (socket) => {
|
||||
})
|
||||
|
||||
const onData = pty.onData((data) => {
|
||||
console.log("terminalResponse", id, data)
|
||||
// console.log("terminalResponse", id, data)
|
||||
io.emit("terminalResponse", {
|
||||
id,
|
||||
data,
|
||||
|
@ -48,7 +48,8 @@ const processFiles = async (paths: string[], id: string) => {
|
||||
fileData.push({ id: path, data: "" })
|
||||
} else {
|
||||
const folder: TFolder = {
|
||||
id: path, // todo: wrong id. for example, folder "src" ID is: projects/a7vgttfqbgy403ratp7du3ln/src/App.css
|
||||
// id: path, // todo: wrong id. for example, folder "src" ID is: projects/a7vgttfqbgy403ratp7du3ln/src/App.css
|
||||
id: `projects/${id}/${parts.slice(0, i + 1).join("/")}`,
|
||||
type: "folder",
|
||||
name: part,
|
||||
children: [],
|
||||
@ -67,6 +68,8 @@ const processFiles = async (paths: string[], id: string) => {
|
||||
})
|
||||
)
|
||||
|
||||
console.log("root", root)
|
||||
|
||||
return {
|
||||
files: root.children,
|
||||
fileData,
|
||||
|
Loading…
x
Reference in New Issue
Block a user