-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow sharing files with guest using UI, even with custom profile #702
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
Conversation
The 9p filesystem is always accessible by the guest, even if the UI is hidden. This will make the file picker UI be shown when needed; all the user has to do is run `ls` on the 9p mount.
src/browser/main.js
Outdated
// Hide the filesystem panel for now | ||
$("filesystem_panel").style.display="none"; | ||
// Show the filesystem panel if it's ever used | ||
emulator.add_listener("9p-read-start", function(args) { |
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'd suggest to add this.bus.send("9p-attach");
here: https://github.com/copy/v86/blob/master/lib/9p.js#L736
and use it instead of 9p-read-start
.
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.
Okay
@@ -733,6 +733,7 @@ Virtio9p.prototype.ReceiveRequest = async function (bufchain) { | |||
marshall.Marshall(["Q"], [inode.qid], this.replybuffer, 7); | |||
this.BuildReply(id, tag, 13); | |||
this.SendReply(bufchain); | |||
this.bus.send("9p-attach"); |
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.
Will this have a performance impact?
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 don't think so.
Cheers! |
@copy Works perfectly! 🎉 |
The 9p filesystem is always accessible by the guest, even if the UI is hidden. This will make the file picker UI be shown when needed; all the user has to do is run
ls
on the 9p mount.