-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Fix remote home button in file transfer #6093
Conversation
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
flutter/lib/models/file_model.dart
Outdated
final homeDir = ( await bind.sessionGetPeerOption( | ||
sessionId: sessionId, name: "remote_home_dir")); | ||
|
||
if (homeDir.isEmpty){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you should run format.
flutter/lib/models/file_model.dart
Outdated
if (homeDir.isEmpty){ | ||
bind.sessionPeerOption( | ||
sessionId: sessionId, name: "remote_home_dir", value: fd.path); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need store it as peer option? it will write disk and pollute peer options.
I could not find any direct implementation for the remote home directory yet but since the home path is correct in the first connection we can just store it according to the session ID and fetch it whenever needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will try to find a better way to get home directory. Or do you mean to store it somewhere else?
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
New changes:
Tested win, android, linux as remote side. Remote button is working the same as the video above. |
fixes #3508 (comment)
The original issue of #3508 has been already fixed (confirmed by OP and me).
Storing and fetching remote home directory for remote home button.Setting the directory as empty is opening home directory.
Rest implementation is unchanged. Local remote home button is working the same as before.
Screen.Recording.2023-10-19.at.4.17.04.AM.mov