Skip to content

Fix for sftp random access

Patrick Wang requested to merge pjwang/kdeconnect-android:master into master

The sftp-server implementation in KDE Connect-Android does not support random access. To be more specific, it does not support seek+read and seek+write.

Backgroud: The mina-sshd 0.14 requires the InputStream and OutputStream to support offsets.

However, kdeconnect-anrdoid ignores that.

This patch:

  1. Support random reads by adding skip() to createInputStream
  2. Disable random writes by throwing exception when offset in createOutputStream is not zero

BUG: 405847 cc @albertvaka

Edited by Patrick Wang

Merge request reports

Loading