tag 619588 patch
thanks

Hi,

The attached patch should fix this problem by always using the system
data directories.  I can't see why we'd want to use the data files
provided by a user.

-- 
Matt Kraai
https://ftbfs.org/kraai
diff -ru specto-0.2.2~/spectlib/util.py specto-0.2.2/spectlib/util.py
--- specto-0.2.2~/spectlib/util.py	2011-03-25 19:45:02.000000000 -0700
+++ specto-0.2.2/spectlib/util.py	2011-03-25 19:46:42.000000000 -0700
@@ -48,15 +48,9 @@
 
 def get_path(category=None):
     """ Return the correct path. """
-    if not os.path.exists('data'):
-        if not category:
-            PATH = "%s/share/specto/" % sys.prefix
-        elif category=="doc":
-            PATH = "%s/share/doc/specto/" % sys.prefix
-    else:
-        if not category:
-            PATH =os.path.join(os.getcwd(), "data/")
-        elif category=="doc":
-            PATH = os.path.join(os.getcwd(), "data/doc/")
+    if not category:
+        PATH = "%s/share/specto/" % sys.prefix
+    elif category=="doc":
+        PATH = "%s/share/doc/specto/" % sys.prefix
     return PATH
 

Reply via email to