Skip to content

Map the share option to the prl_fsd --share flag #505

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 1 commit into from
May 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,23 @@ def self.mount_parallels_shared_folder(machine, name, guestpath, options)

# prl_fsd does not support the _netdev option, so we need to remove it from the mount options
# for supported mount_options check prl_fsd --help in guest machine after installing Parallels Tools
prl_fsd_mount_options = mount_options.split(',').reject { |opt| opt == '_netdev' }.join(',')

# the `share` option needs to be passed as an extra `--share` argument

prl_fsd_mount_options = mount_options.split(',').reject { |opt| opt == '_netdev' }

if mount_options.include?('share')
share_flag = '--share'
prl_fsd_mount_options.reject! { |opt| opt == 'share' || opt.start_with?('uid=', 'gid=') }
else
share_flag = ''
end

o_options = prl_fsd_mount_options.join(',')

mount_command = <<-CMD
if [ -f /usr/bin/prl_fsd ]; then
prl_fsd #{guest_path} -o big_writes,#{prl_fsd_mount_options},fsname=#{name},subtype=prl_fsd --sf=#{name}
prl_fsd #{guest_path} -o big_writes,#{o_options},fsname=#{name},subtype=prl_fsd #{share_flag} --sf=#{name}
else
mount -t #{mount_type} -o #{mount_options} #{name} #{guest_path}
fi
Expand Down