Skip to content

fix(sftp): stop crash when creating a folder at the SFTP root - #3138

Merged
bajrangCoder merged 1 commit into
mainfrom
fix/sftp-stat-root-crash
Dec 1, 2026
Merged

bajrangCoder merged 1 commit into
mainfrom
fix/sftp-stat-root-crash

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member
  • Fixes app crash (ArrayIndexOutOfBoundsException: length=0; index=-1 in Sftp.stat) when creating a new folder in the root of an SFTP connection.

Creating a folder at the SFTP root stats "/", where splitting the path
gave an empty array and threw ArrayIndexOutOfBoundsException on the
worker thread, killing the app. Also route unexpected runtime errors in
SFTP handlers to the JS error callback instead of crashing.
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Fixes the crash when stat reads the SFTP root during folder creation.

  • SFTP root paths now get a name without crashing.
  • SFTP operations send runtime failures to their error callbacks.

Reviews (2) · Last reviewed commit: "fix(sftp): stop crash when stat is calle..." · Reviewed by Greptile

@bajrangCoder
bajrangCoder added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 5bf8c22 Dec 1, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Dec 1, 2026
@bajrangCoder
bajrangCoder deleted the fix/sftp-stat-root-crash branch December 1, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant