Skip to content

Commit 88f33c0

Browse files
committed
fix: file listing in sftp(Acode-Foundation#754)
1 parent ef83962 commit 88f33c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fileSystem/sftp.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class SftpClient {
7878
if (stat) options += "d";
7979

8080
sftp.exec(
81-
`ls ${options} --full-time -L "${path}" | awk '{$2=\"\"; print $0}'`,
81+
`/usr/bin/ls ${options} --full-time -L "${path}" | awk '{$2=\"\"; print $0}'`,
8282
async (res) => {
8383
if (res.code <= 0) {
8484
if (stat) {
@@ -574,7 +574,7 @@ class SftpClient {
574574

575575
targetType = await new Promise((resolve, reject) => {
576576
sftp.exec(
577-
`ls -ld "${this.#safeName(linkTarget)}"`,
577+
`/usr/bin/ls -ld "${this.#safeName(linkTarget)}"`,
578578
(res) => {
579579
if (res.code <= 0) {
580580
const output = res.result.trim();

0 commit comments

Comments
 (0)