r3881 - packages/trunk/titanion/debian/patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Sun Aug 26 21:15:58 UTC 2007
Author: pdewacht-guest
Date: 2007-08-26 21:15:57 +0000 (Sun, 26 Aug 2007)
New Revision: 3881
Modified:
packages/trunk/titanion/debian/patches/dotfile.patch
Log:
check getenv("HOME") != null
Modified: packages/trunk/titanion/debian/patches/dotfile.patch
===================================================================
--- packages/trunk/titanion/debian/patches/dotfile.patch 2007-08-26 21:14:08 UTC (rev 3880)
+++ packages/trunk/titanion/debian/patches/dotfile.patch 2007-08-26 21:15:57 UTC (rev 3881)
@@ -1,7 +1,7 @@
Index: titanion_0.3.dfsg1/src/abagames/ttn/replay.d
===================================================================
---- titanion_0.3.dfsg1.orig/src/abagames/ttn/replay.d 2007-08-26 22:18:35.000000000 +0200
-+++ titanion_0.3.dfsg1/src/abagames/ttn/replay.d 2007-08-26 22:20:06.000000000 +0200
+--- titanion_0.3.dfsg1.orig/src/abagames/ttn/replay.d 2007-08-26 22:20:21.000000000 +0200
++++ titanion_0.3.dfsg1/src/abagames/ttn/replay.d 2007-08-26 22:20:26.000000000 +0200
@@ -8,13 +8,13 @@
private import std.stream;
private import abagames.util.sdl.pad;
@@ -37,8 +37,8 @@
if (ver != VERSION_NUM)
Index: titanion_0.3.dfsg1/src/abagames/ttn/preference.d
===================================================================
---- titanion_0.3.dfsg1.orig/src/abagames/ttn/preference.d 2007-08-26 22:18:35.000000000 +0200
-+++ titanion_0.3.dfsg1/src/abagames/ttn/preference.d 2007-08-26 22:18:40.000000000 +0200
+--- titanion_0.3.dfsg1.orig/src/abagames/ttn/preference.d 2007-08-26 22:20:21.000000000 +0200
++++ titanion_0.3.dfsg1/src/abagames/ttn/preference.d 2007-08-26 23:15:14.000000000 +0200
@@ -6,6 +6,9 @@
module abagames.ttn.preference;
@@ -49,13 +49,16 @@
private import abagames.util.preference;
/**
-@@ -21,10 +24,21 @@
+@@ -21,10 +24,24 @@
int[RANKING_NUM][MODE_NUM] _highScore;
int _lastMode;
+ public static char[] pref_dir()
+ {
-+ char[] dir = std.string.toString(getenv("HOME")) ~ "/.titanion";
++ char * home = getenv("HOME");
++ if (home is null)
++ throw new Error("HOME environment variable not defined");
++ char[] dir = std.string.toString(home) ~ "/.titanion";
+ try {
+ mkdir(dir);
+ } catch (FileException e) {
@@ -72,7 +75,7 @@
int ver;
fd.read(ver);
if (ver != VERSION_NUM)
-@@ -50,7 +64,7 @@
+@@ -50,7 +67,7 @@
}
public void save() {
More information about the Pkg-games-commits
mailing list