Skip to content

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

Merged
merged 4 commits into from
Jul 14, 2022

Conversation

hello-smile6
Copy link
Contributor

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.

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.
// 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) {
Copy link
Owner

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.

Copy link
Contributor Author

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");
Copy link
Contributor Author

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?

Copy link
Owner

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.

@copy copy merged commit b966652 into copy:master Jul 14, 2022
@copy
Copy link
Owner

copy commented Jul 14, 2022

Cheers!

@hello-smile6
Copy link
Contributor Author

@copy Works perfectly! 🎉
image
That's Alpine Linux (the -virt disk image) on https://v86-9pfs.vercel.app/ (a v86 deployment with this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants