[Pkg-privacy-commits] [mat] 01/01: Detect a bit more accurately whether we're run from a Git checkout (Closes: MAT#7858, Debian#759819).
    Ximin Luo 
    infinity0 at moszumanska.debian.org
       
    Sat Aug 22 12:58:31 UTC 2015
    
    
  
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch bugfix/7858-better-detect-data-dir
in repository mat.
commit bd283888433491126a1eb929f1d634c64055661f
Author: intrigeri <intrigeri at boum.org>
Date:   Sat Aug 30 19:06:03 2014 +0000
    Detect a bit more accurately whether we're run from a Git checkout (Closes: MAT#7858, Debian#759819).
---
 libmat/mat.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libmat/mat.py b/libmat/mat.py
index 70e9d75..0519448 100644
--- a/libmat/mat.py
+++ b/libmat/mat.py
@@ -47,7 +47,9 @@ def get_logo():
 def get_datadir():
     ''' Return the path to the data directory
     '''
-    if os.path.isdir('./data/'):
+    if os.path.isdir('./data/') \
+    and os.path.isfile('./mat.1') \
+    and os.path.isfile('./data/FORMATS'):
         return './data/'
     elif os.path.isdir('/usr/local/share/mat/'):
         return '/usr/local/share/mat/'
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git
    
    
More information about the Pkg-privacy-commits
mailing list