Subject: [bug#40818] [bug #40818] "Add bsd-games"

From: Vitaliy Shatrov <[email-masked]>
Date: Wed, 17 Jun 2020 16:42:39 +0000

About ~/.local/share/xxx: Will things like this "bsd-hack"-patch be accepted?

Sent with [ProtonMail](https://protonmail.com) Secure Email.

--- bsd-games-2.17.orig/hack/hack.main.c	1970-01-01 07:00:01.000000000 +0700
+++ bsd-games-2.17/hack/hack.main.c	2020-06-17 22:09:31.424759883 +0700
@@ -552,8 +552,15 @@
 #endif
 
 #ifdef HACKDIR
-	if (dir == NULL)
-		dir = HACKDIR;
+	/* Guix: make "hack" target the user's HOME as default. */
+	if (dir == NULL) {
+		/* Guix: i'm sorry for using the plain numbers. */
+		char hackdir_str[1026] = "";
+		strncat(hackdir_str, getenv("HOME"), 512);
+		strcat(hackdir_str, "/");
+		strncat(hackdir_str, HACKDIR, 512);
+		dir = hackdir_str;
+	}
 #endif
 
 	if (dir && chdir(dir) < 0) {