Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #112 from leaphy-robotics/python-editor
Browse files Browse the repository at this point in the history
fix: forgot slash in between root path and entry
  • Loading branch information
koen1711 authored Jan 22, 2024
2 parents 0c73eb8 + 5b1cf79 commit 0a464f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/services/python-uploader/filesystem/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def ls(path):
path = path[:-1]
dirContent = []
for entry in os.listdir(path):
stat = os.stat(path + entry)
stat = os.stat(path + "/" + entry)
if (stat[0] & 0x4000) != 0:
dirContent.append({'name': entry, 'isDir': True})
elif (stat[0] & 0x8000) != 0:
Expand All @@ -103,7 +103,7 @@ print(ls("${path}"))`;
await sendCommand(writer, lsCommand);
const { stdOut, stdErr, failed } = await readResponse(reader);
if (failed) {
throw new Error(stdErr);
throw new Error(stdErr + "'\nWhile getting: " + path);
}
console.log(stdOut);
return JSON.parse(stdOut);
Expand All @@ -117,7 +117,7 @@ async function rm(writer: WritableStreamDefaultWriter, reader: ReadableStreamDef
await sendCommand(writer, rmCommand);
const { stdOut, stdErr, failed } = await readResponse(reader);
if (failed) {
throw new Error(stdErr);
throw new Error(stdErr + "while getting: " + path);
}
}

Expand Down

0 comments on commit 0a464f7

Please sign in to comment.