summarylogtreecommitdiffstats
path: root/placedb.patch
blob: 18c77ec3d64395e43560e39400f6e89c81871b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- placedb.orig	2013-01-06 12:48:31.576937271 +0100
+++ placedb2.py	2013-01-06 12:53:06.693886827 +0100
@@ -1,6 +1,6 @@
 import os
 import pickle
-
+import shutil
 
 class PlaceDB:
 
@@ -23,7 +23,10 @@
 			self.alt = alt
 		
 
-	FILENAME = os.path.join('Res', 'placedb.dat')
+	ORIG_FILENAME = os.path.join('Res', 'placedb.dat')
+	FILENAME = os.path.join(os.path.expanduser('~/.config/morinus'), 'placedb.dat')
+	if not os.path.exists(FILENAME):
+		shutil.copyfile(os.path.join("/usr/lib/python2.7/site-packages/morinus", ORIG_FILENAME), FILENAME)
 
 	def __init__(self):
 		self.placedb = []