diff --git a/winehelper b/winehelper index 266a057..55f8c68 100755 --- a/winehelper +++ b/winehelper @@ -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"