Append workspace basename to guest_path

This commit is contained in:
Joshua Bell 2026-01-26 10:34:05 -06:00
parent 7864673dcb
commit 3e772152ad

View file

@ -59,8 +59,10 @@ EOF
register_workspace() {
local workspace_path="$1"
local hash="$2"
local dir_name
dir_name=$(basename "$workspace_path")
local mount_tag="ws_${hash}"
local guest_path="/workspace/${hash}"
local guest_path="/workspace/${hash}_${dir_name}"
# Create workspaces.json if it doesn't exist
if [[ ! -f "$QVM_WORKSPACES_FILE" ]]; then
@ -172,11 +174,13 @@ main() {
local workspace_path
workspace_path="$(pwd)"
# Generate workspace hash
# Generate workspace hash and guest path
local hash
hash=$(workspace_hash "$workspace_path")
local dir_name
dir_name=$(basename "$workspace_path")
local guest_path="/workspace/${hash}"
local guest_path="/workspace/${hash}_${dir_name}"
log_info "Workspace: $workspace_path"
log_info "Guest path: $guest_path"