Sfoglia il codice sorgente

fix(bt): missing user data directory (#3916)

Marcin Jakubowski 3 anni fa
parent
commit
9fc6244fc3
3 ha cambiato i file con 23 aggiunte e 0 eliminazioni
  1. 5 0
      lgsm/functions/core_functions.sh
  2. 2 0
      lgsm/functions/fix.sh
  3. 16 0
      lgsm/functions/fix_bt.sh

+ 5 - 0
lgsm/functions/core_functions.sh

@@ -346,6 +346,11 @@ fix_armar.sh() {
 	fn_fetch_function
 }
 
+fix_bt.sh() {
+	functionfile="${FUNCNAME[0]}"
+	fn_fetch_function
+}
+
 fix_bo.sh() {
 	functionfile="${FUNCNAME[0]}"
 	fn_fetch_function

+ 2 - 0
lgsm/functions/fix.sh

@@ -43,6 +43,8 @@ if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then
 		fix_armar.sh
 	elif [ "${shortname}" == "ark" ]; then
 		fix_ark.sh
+	elif [ "${shortname}" == "bt" ]; then
+		fix_bt.sh
 	elif [ "${shortname}" == "bo" ]; then
 		fix_bo.sh
 	elif [ "${shortname}" == "csgo" ]; then

+ 16 - 0
lgsm/functions/fix_bt.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+# LinuxGSM fix_bt.sh module
+# Author: Daniel Gibbs
+# Contributors: http://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Resolves an issue with Barotrauma.
+
+functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+# Fixes: Missing user data directory error.
+if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then
+	fixname="Missing user data directory error."
+	fn_fix_msg_start
+	mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma"
+	fn_fix_msg_end
+fi