Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sftp upload bug #165

Closed
thri1hous opened this issue Oct 26, 2023 · 5 comments
Closed

sftp upload bug #165

thri1hous opened this issue Oct 26, 2023 · 5 comments
Labels
bug Something isn't working Required Work: Moderate

Comments

@thri1hous
Copy link

thri1hous commented Oct 26, 2023

re-posting of this issue x0b#239

What version of Round Sync are you using (About -> App version)?

RoundSync - v2.2.2

What is your Android version, phone model and manufacturer?

Android 13, OnePlus 8t

Which steps are required to reproduce this issue?

1. Create new SFTP remote with only username and password (issue persistent with public/private key)
2. Log into remote and navigate to directory outside of the home directory e.g. /media/ext/test/
3. Upload file to this directory from local storage or create new folder e.g test.txt
4. Instead of copying the file to /media/ext/test/test.txt rclone copies the file to /home/username/media/ext/test/test.txt creating new directories if needed. Basically it treats the home directory as the root directory

Please also enable rclone logging (Settings > Logging > Log Rclone errors). You're going to need the log for the last question.
The app doesn't think it had an error so this is left blank

What is your configuration (rclone.conf)?

You can reproduce this with a clean .conf and new SFTP remote

Does the same issue also occur when using the same configuration on a PC or in Termux?

no but you are passing the path on cli, not relying on a gui to pass the right path

this seems to be an issue where the leading / is just left out of the path name. so i would think this is an easy fix
this might also be the cause of this issue
#113
if the user tries to download a file /test.txt but rclone tries to download ~/test.txt that file might not exist so the download will fail

@newhinton
Copy link
Owner

Thanks for the analysis, i will have to eventually look into it. Though your hint with the missing slash is a really good starting point!

@newhinton newhinton added the bug Something isn't working label Oct 26, 2023
@newhinton
Copy link
Owner

Okay, i have a good idea where the issue is.

However, to fix it, i have to understand the implications of my change, and that can take a while. The responsible file is close to 2200 lines long.

For Reference:


(New Folder) and
intent.putExtra(UploadService.REMOTE_ARG, remote);

(Upload Files)

This very likely also applies to any interaction with "non-standard" paths that do not start at / by default. And all actions with them.

@thri1hous
Copy link
Author

Yeah fix could have unknown implications. I'd be happy to help test different remotes once you've decided on a path forward for the fix. Hopefully we can make sure a fix won't break something else.

@newhinton
Copy link
Owner

I have created a prerelease which contains a fix. It is still under testing, so use at your own risk, but if you are willing to check it, feel free!

@thri1hous
Copy link
Author

I tested the prerelease and I can confirm the issue is now fixed. I tried to test the other issue issue
And it's seems to be fixed but I never tried to recreate the issue on the older version so I can't confirm. Maybe the person who created that can test to confirm.
I will continue to test with other remotes to try to make sure the fix didn't create unintentional issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Required Work: Moderate
Projects
None yet
Development

No branches or pull requests

2 participants