unshare desktop directories

This commit is contained in:
Mikhail Tergoev
2025-07-08 09:09:02 +03:00
parent 9caea05eb5
commit bd9d5b9561

View File

@ -945,6 +945,7 @@ init_wineprefix () {
fi
export DRIVE_C="$WINEPREFIX/drive_c"
export XUSER_PATH="$DRIVE_C/users/xuser"
if [[ ! -f "$WINEPREFIX/.firstboot" ]] ; then
create_new_dir "$WINEPREFIX"
@ -974,10 +975,10 @@ init_wineprefix () {
print_info "Windows версия изменена на win${WH_WINDOWS_VER}"
fi
if [[ -d "$DRIVE_C/users/xuser" ]] && [[ ! -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/xuser" "$DRIVE_C/users/$USER"
elif [[ ! -d "$DRIVE_C/users/xuser" ]] && [[ -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/$USER" "$DRIVE_C/users/xuser"
if [[ -d "$XUSER_PATH" ]] && [[ ! -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$XUSER_PATH" "$DRIVE_C/users/$USER"
elif [[ ! -d "$XUSER_PATH" ]] && [[ -d "$DRIVE_C/users/$USER" ]]
then try_force_link_dir "$DRIVE_C/users/$USER" "$XUSER_PATH"
fi
if [[ ! -f "$WINEPREFIX/.update-timestamp" ]] ; then
@ -986,12 +987,15 @@ init_wineprefix () {
wait_wineserver
fi
if [[ -L "$XUSER_PATH/Desktop" ]]
then rm -f "$XUSER_PATH/Desktop"
fi
create_new_dir "$XUSER_PATH/Desktop"
if [[ ! -L "$WINEPREFIX/dosdevices/h:" ]]
then try_force_link_dir "$HOME" "$WINEPREFIX/dosdevices/h:"
fi
try_remove_file "$DRIVE_C/windows/system32/winemenubuilder.exe"
if [[ $WH_USE_MESA_GL_OVERRIDE == "1" ]] \
&& ! lspci | grep -i nvidia > /dev/null ; then
export MESA_GL_VERSION_OVERRIDE="3.3"