diff --git a/bin/qvm-run b/bin/qvm-run index 962ed06..99cb73a 100755 --- a/bin/qvm-run +++ b/bin/qvm-run @@ -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"